They started off as party 9.
Tolkein found 9 too unwieldy so he , spoiler alert, killed
Boromir and Gandalf (sort of)
, and separated the rest into a group of 2 and 5.
2 was too small so he added Gollum to make a party of 3.
5 was too big so he separated Mary and Pippen into their own party, making a party of 2 and a party of 3.
Seems the master of the fantasy genre, J. R. R. Tolkein, learned the very important lesson that parties greater than 4 are just too big and slow down combat too much.