Did you need to apply to go to the same place? Or was this just a fictional thing for plot purposes?
I know of an specific instance. In WW1 the British, by direction of Lord Derby, set up "Pals Battalions", where men were able to join and serve alongside their friends, or neighbors, even guild members from certain occupations joined together. The first one was made up of Liverpudlians.
The idea was a bit of a disaster though, in times of mechanized killing and shellings and all that a small town could lose almost all their men in a single attack, and the idea was suspended when conscription was introduced in 1916.
The US army had a program during Vietnam to allow buddies to enlist, train and serve together. It was meant to boost morale.