What you need to understand is that bitcoin rules are not written in stone. The rules are agreed upon by the miners. Before a block is accepted to the chain, the nodes check if the block meets the rules. This is how the rules are enforced. So theoretically, the miners could decide that there will always be bitcoins to mine. If this decision is not unanimous, some miners would keep using the old rules, and you would get two different chains, bitcoin and “bitcoin classic”.
However, the ones who eventually decide which bitcoin would survive are the bitcoin holders. If miners enforce an unpopular rule, the value of their currency will drop, because people will continue to use the old currency and sell the new one.
And coming back to the question of earning money for making transactions, already today, mining is not the only source of income for miners. They charge you to put your transaction in their mined block sooner. Just think about it: in order to make a bitcoin transaction you need to find somebody with enough computing power to guess the right number that will make their block fit in the chain, and convince them to put your transaction in that block.