Currently, there is a clear incentive to spending CPU time to generate blocks. For every block I generate, I get 50 BTC. But when the 21mil BTC mark is reached and no more BTC are being generated, would it be correct to say that I would have no incentive to spend costly electricity to generate new blocks, since I don't get anything more out of it? If that's the case, what if the majority of people stopped generating blocks? Wouldn't that destroy the underlying security of the Bitcoin system?
(Forgive me if I grossly misunderstand the nature of generating blocks.)