he didnt choose 21m btc and then calculate backwards that over X years backwards means the base genesis has to release 50btc
instead he looked at a base coin to release at genesis that was not too many coins but also not too few that it would stop halving so soon. or not to few to not be tempted/seem worthy
he wanted a number that would half every period. but didnt want some random number.
he also didnt want the binary value to be large where by it would take up lots of bytes in a transaction
he decided on 4 bytes(32bits)
which would be at max
111111111111111111111111111111111 = 8589934591sat (when doing the 'scarcity' illusion of dividing sats by 100m to make it a system of measure 'buckets/allotments' called btc at 85.89934591btc)
which wouldnt a nice round number and would cause decimal sats issues of rounding instantly at first halving
(halving the 1 sat =0.5.. halving the 9sat=4.5 halving the 5 sat=2.5)
so had to find a round number that would not need to be rounded for many halving sessions atleast
he knew that deflation meant more value per coin so he had to do a x100,000,000 of a base binary measured unit, to start an allotment as looking reasonably small. but allow alot of allotment decimals to allow share-ability when value went up, but without really breaking the decimal of the base binary amount(sat) for a while.
so he then looked for nicer rounded numbers to start.. and settled on 5000000000sat
by which when doing the other rules of the 210k block having worked out as 2,099,999,997,690,000sat
after ~133 years (just under 21m btc)
which all sounded more reasonable..
..
(my personal theories of his other thoughts)
he could have started with the 32bits and using binary of.. 5000000000sat and called a btc an allotment of just 10m sats
meaning releasing 500btc a block initially. but then that doesnt seem as scarce/valued in the beginning
it would also be limiting the divisions when value was higher in 133 years. so having it as a allotment with 8 decimals instead of 7. seemed logical for both initial release and long term share-ability of divisions later
he also could have made the btc allotment 9 decimals releasing only 5btc per block. but after the amount of blocks it would only be under 2.1m coin released which meant that people would think there was not enough whole coins for a wide enough population to be interested in, in the beginning.(not enough whole allotments for wide adoption)
so the near 21m made it seem early on, enough allotments of btc to spread around a nice multi million user base. which can then divide down to more users only holding smaller subsets as value grows.