There was actually a reason behind it that had to do with how bytes are divided or something like that, or maybe with the gold supply... I remember reading some theory about it, so it was not fully arbitrary, there was some thought put into it.
It's similar to the 1MB blocksize, it is what it is, but there is also thought put behind the number. Satoshi didn't simply roll a dice and choose these numbers.
It's detailed here -
https://bitcoinmagazine.com/articles/satoshis-genius-unexpected-ways-in-which-bitcoin-dodged-some-cryptographic-bullet-1382996984/Quite stunning how much thought went into every possible aspect. That's why I think it was a group that did. A bunch of heads finds many more potential holes than one.
So from what I can tell there's no particular reason that it's exactly 21m but there is a reason it's under a certain amount and that is with regard to how computers can process integers, interesting, still think there must be something behind 21, based on what I read it could have been 22m or any number close to it.