Often companies with good ESG scores optimize for having good scores. Its like studying to the test and they may have particularly poor results outside of the test that they have studied for. Also, ESG is political and like all things that involve politics, many things that may be good for the score may be bad for the environment. Easiest example to see is in energy with things like nuclear power, and 'biomass' and coal.