What would happen is that if a company went bankrupt, any work that needs to be done to clean the area falls to the public trust, which is gathered through taxes. There often wasn’t enough money there so the issue would get ignored.
Now there are what’s called Reclamation Bonds, which is usually the cost that would be needed to reclaim 100% of the area the company plans to work with. A company is required to put up half of that amount before they start, then the other half on the day they break ground. That way if the company declares bankruptcy, the money in the Reclamation Bond can be used to fix up the affected areas.