Bitcoin's entire raison d'etre is that its transaction clearing mechanism is decentralized among untrusted parties. The best known way to enforce honest participation in this mechanism is by requiring workers (miners) to prove that they've expended resources (incurred a cost) in order to to be eligible to publish the next block and claim the block reward + transactions fees.
When a miner Finds a valid hash for a block, they prove that they've consumed a certain amount of electricity in a way they everyone can easily verify. In order for someone to perform a 51% attack, they have to use more electricity than everyone else, which is probably more expensive than just participating honestly. The security of the network is proportional to the amount of money it costs to attack it.
Mining is therefore neither wasteful nor inefficient, if it is understood that the goal is to have a decentralized, censorship-free currency that disincentivizes attacks.
When a miner Finds a valid hash for a block, they prove that they've consumed a certain amount of electricity in a way they everyone can easily verify. In order for someone to perform a 51% attack, they have to use more electricity than everyone else, which is probably more expensive than just participating honestly. The security of the network is proportional to the amount of money it costs to attack it.
Mining is therefore neither wasteful nor inefficient, if it is understood that the goal is to have a decentralized, censorship-free currency that disincentivizes attacks.