When you purchase a piece of property, you also assume responsibility for the property related rights and duties. This includes so called Zustandsstörerhaftung für Kontaminationen auf dem Grundstück (status-disturbance liability for property contamination, i.e. liability accruing to the current property owner). It makes no difference which party originally caused the contamination.
In carrying out contamination related investigations and cleanup measures, the authorities are empowered to file claims against the party that caused the contamination or the current property owner.