Why 21 million bitcoins?
I don't know if this was thought up ahead of time, but it sure makes sense in hindsight.
The reason 21 million is the right number is because people don't know how to value currencies.
For instance, right now a Euro is worth $1.30 USD and a Japanese yen is worth about a U.S. penny. Ask someone which currency they would rather hold right now and most will answer Euro, because $1.30 is worth more than $0.01.
Of course, that relative unit value means nothing. Ask most currency traders which currency is better to hold and most (today) would probably say Japanese yen, because what matters is whether the value will go up or down, relative to the other being compared.
When bitcoin hit parity with the U.S. dollar in Feb 2011, it gained a sense of legitimacy that helped propel it on a tremendous pace, rising over 30X that level just four months later.
If there had been more than 6 million coins issued by then, the total dollar value of all bitoins would probably have been about the same, and thus the exchange rate would then have been lower. So let's say there were instead 60 million coins issued by Feb 2011, and each one worth a dime. That 60M X $0.10 is the exact same total dollar valuation the 6M X $1 has ($6M) for all bitcoins combined. Tthe difference is that because it had become "worth more than a dollar", and as a result people attributed greater interest and respect for it. Had it not been "worth more than a dollar" so early, it might have taken a whole lot longer to get the name recognition and attention it did that has helped attract the participants that Bitcoin has today.
Bitcoin today stands on "dollar parity"'s shoulders.
That may sound bizarre but ask that Euro / Yen question to different people yourself and then ask the reason why their answer was given.