This is the reason there is a incentive in place, miners get the coinbase reward for every completed block and thus encourages them to not attempt to cheat the system as it is far more rewarding to simply mine.
Also, an attempt to cheat the system through.a 51% attack would be quickly discovered and the shady chain would be dropped, so someone who invested millions of USD into buying mining hardware to own over half of the hashrate would be quickly discovered should or when they attempt an attack on the network.