The issue is:
1. Oil companies knew about fossil fuel harm to the environment, and then lied about/tried to cover it up. They've directly played a role in climate misinformation. They've done that so well that we now have armies of people with no relevant knowledge on the topic arguing that climate change is a hoax.
2. If the danger of fossil fuels was acknowledged long ago, we could have prepared for it in advance. This would have eaten into profits, hence the motivation to deny it's a problem.