As we all know, the total amount of bitcoins to ever exist will be 21 million. In fact, it's 20,999. No one has ever explained why that number was chosen. Was it completely random? Or was there something else, that influenced that decision? I have a theory that might help to explain, at least partially, that mystery. So, suppose you were to design Bitcoin.
First of all, we should go from the assumption that we are designing a deflationary currency, thus the number of bitcoins should be limited. As soon as this is set, you start thinking about how much should eventually be issued. To you it doesn't really matter personally, since you'll be able to mine as much as you want before anyone else has a chance. But, since it would be safe to assume prices are going to be quoted per 1BTC in the future, it means that psychologically, it is unwise to choose a very big number for the total amount: a price growth from $0.0001/BTC to $0.01/BTC is not as impressive as from $1 to $100 - not from an investor's point of view, but from the general public's point of view. Thus, theoretically, the more coins you have, the slower the price rise and, as a result, the slower the infrastructure growth. There's even a danger that due to a slow growth rate Bitcoin might never catch up in the first place. Thus, the incentive is to make less coins, not more.
Now, we have an explanation why we need less coins. But why do we have 21 million and not 10? Partially this might be attributed to the fact, that psychologically, a growth too fast would be detrimental to the Bitcoin economy. Then, even though you can divide a single Bitcoin, having less bitcoins make it less liquid, which is undesirable.
A friend of mine pointed out, that the theory above explains why we have 21 million bitcoins and not 210 million, but it doesn't explain why exactly 21 million (and not, say 25 million) was chosen as the final number of Bitcoins to be mined. I think, it may be reasonable to speculate that Satoshi built a couple of models, using the existing data from stock markets, which helped him understand how many bitcoins would be just enough for his projections of Bitcoin development to be fulfilled. 21 million may have been the average number that Satoshi decided to go with after comparing data from a number of his models. It may have turned out to be wrong eventually, but maybe Satoshi decided to just trust the data that he had and use 21 million as the most appropriate number.
Another question that one might ask: do block average mining period and block reward have anything to do with it at all? My answer is that block mining period is irrelevant to the theory above. If it was set to 20 instead of 10 minutes (for, say technical reasons), we could still adjust block reward to meet our demands.
If my theory is correct, it should be possible to prove it with data. The only variable we don't know is what were Satoshi's expectations for the Bitcoin advancement. But frankly, I find it very hard to believe that the number 21 million is random.