well back when we started using coal and petrol we didn't know as much about the atmosphere and didn't think think we can have as much of an effect on it, than we know today. also compared to the earth friendly resources, coal and petrol is a lot simpler to utilize in the short run so it was seen as the cheapest fuel to base our infrastructure on.