The US Navy has something called Service Selection Day at USNA every year,  where soon to be Graduates pick their Service Selection jobs by a formula that rates them pick number 1 to about 1,100 Graduates !
Navy Ships, USMC ground, various Air slots both USN & USMC take up the majority of the available slots !
Submarines need about 50 +/- a year. If less than the needs of the Navy select Subs, than Grads with high GPA in fields like electrical engineering are "Volunteered" from the grads, "Needs of the Navy" !  They get assigned to one of 2 Nuke Schools to get their Master's in Nuke Engineering in 18 months, before assignment to a sub. (They are ALL nukes!)  Don't feel bad, the grads of Nuke Power being sent to Subs get a Bonus that used to be $ 35,000,  Sure it's higher now.