...a Royal Navy officer had to join as a Midshipman and work his way up.
Only partly true. First, you had to find someone who'd be prepared to take you to sea as a Midshipman in the first place. Then, once you'd passed your exam for lieutenant you had to persuade the Admiralty or the local C-in-C to appoint you to a ship as a lieutenant. Finally, you had to have considerable 'interest' to gain the all-important step to command of a post ship.
At all these stages the intervention of influential relatives was all important. And it didn't help if your patron wasn't of the right political party, either.