And in the very earliest days of assigning numbers to players, one technique was to use the batting order (which was solid as cement for extended periods) as a guide. That's how Babe Ruth got #3 and Lou Gehrig got #4.
Association Football still sorta uses #'s for positions. Actually more prevalent years ago, but still.....
GK's are 1
Defenders usually run 2,3,4,5
Midfielders 6, 7, 8 (6 is usually a defensive midfielder)
Strikers/Forwards often are 9, 11
And the playmaker is usually 10.
Rugby definitely goes by position. Starters wear 1-15 based on their position.
1-8 are the forwards (the big guys who make up the scrum)
9-15 are the backs (speed).
9 is the Scrumhalf (gets the ball out of the scrum and starts the plays)
10 is the Flyhalf (kind of QB and does most of the kicking)