That the ranking of hands corresponds to the chances of getting them is convenient, but quite arbitrary.
There's no inherent reason why it has to be that way.
For instance, you could play a version of straight poker where a pair of red twos beats everything.
Even though getting that hand is far more likely than a royal flush, it could still be an interesting ...
An explanation of how these numbers were derived is available in Johanson, Michael. (2013). Measuring the Size of Large No-Limit Poker Games.
Essentially those are the number of card combinations from one player’s point of view in a heads-up limit Texas hold’em game after merging strategically identical combinations.
How to count different card combinations ...