Energy prices are not always necessarily free market prices. Governments might pay for "green" energy sources if that's their policy so this type of energy is cheaper than it would be otherwise, or other countries might do the same with other sources of energy. So energy costs different prices in different locations. Hypothetically energy could be provided "free" (paid by the state with taxpayer money), then Bitcoin would be worth nothing because energy costs nothing or made infinitely expensive by blocking certain sources of energy. So the real price of energy to generate Bitcoin is distorted.
Hashrate is pure signal that shows that people value mining Bitcoin more than what else could be done with the energy.