The Bitcoin Consensus Rules
Ever since Bitcoin was first designed, the following consensus rules were written into the code and it exist to this day:
1) 21,000,000 Bitcoins to ever be produced
2) Target of 10-minute block intervals
3) Halving event occurring every 210,000 blocks (approximately every 4 years)
4) Block reward which starts at 50 and halves continually every halving event until it reaches 0 (approximately by year 2140)
Many people think that the whole purpose of mining is to get the rewards but that's just the incentive built into the system so that people invest in purchasing and running miners to secure the Bitcoin Network.