They are toiling for this money. Specifically, the mining system exists in order to verify transactions, put them together into a block, and distribute that block to be added to every client's copy of the blockchain. The reward for performing this very important task is a certain number of Bitcoins "generated" at present, along with transaction fees that the miner can collect from any transaction which includes them.
The reason for centralising the Bitcoin network on the miners (and for each block, one particular miner) this way is simple - consensus. It's of paramount importance that every client on the network has exactly the same copy of the blockchain, otherwise double-spending can occur - causing one half of the network to believe that some Bitcoins were transferred to one address, and the other half to believe they were transferred to another.
The easiest way to do this is to build the network in such a way that one node holds an authoritative copy of the blockchain, and distributes that out to everyone else. But that goes against the concept of a decentralised network. So instead, what Bitcoin has done is built a system where every mining node races to solve a computationally hard problem, that they can prove they found the answer to, in order to become authoritative in order to add a single block to the blockchain. The incentive to do so is the "mined" Bitcoins, along with the transaction fees for every transaction included in that block.
Without this system, Bitcoin could not exist.
For the record - even though the miner is authoritative in adding a block to the blockchain, it cannot forge transactions. It can however refuse to add a transaction to the block, which sometimes happens if the offered transaction fee is too low. The transaction might be added to future blocks if other miners are OK with the transaction fee.
Moreover, how economically viable is it for the generation of currency to be proportional to wasted wealth (i.e. electricity spent mining coins)? Isn't money supposed to track created wealth?