21 million was not chosen, 21 million is the result of multiple other choices.
Initial block reward was 50BTC
1 block is made every 10 minutes
Block reward halves every 4 years
Those three choices lead to 21 million coins, after so many halvings the block reward eventually hits 0 and at that time the number of coins generated happens to be just under 21 million.