Bitcoin mining is so expensive because this is part of the proof of work mechanism for obtaining security on the bitcoin network. The protocol mechanism in fact makes sure to encourage the correct behavior of the miners who can create a new correct block and validate it because it is added to the blockchain and consequently the whole network becomes secure in a trustless way and without the need for a central unit or an intermediary.
From an energy point of view, it conveys energy towards the validation of the block, making the block (through subsequent blocks) completely unchangeable and therefore making the "clearing" of bitcoin transactions extremely safe and decentralized.

These bitcoin features (which make it the real benefit as a means of storing value) use energy. However, this is often demonized by detractors who do not consider how much energy is currently used for the extraction of gold or from the banking system but there are a thousand other examples. The use of energy for a basic security function is not a waste, but an employment that is the basis of a democratic and decentralized economic system. Miners also have an incentive to use renewable energy and to find low-impact energy funds and lower costs.