Progression in the ranks of the Royal Navy usually did indeed have a lot more to do with "who you knew" rather than "how well you did your job". Patronage was key to promotion. A skilled but patron-less officer was likely doomed to remain un-promoted, unless they were so skilled and talented (or lucky) they could no longer be ignored by the Naval bureaucracy. Young master Hornby certainly had patronage in the form of his esteemed father, and even after his father died, many of his father's old friends continued to support him.
Once a British naval officer attained the rank of "Post-Captain", neither merit nor patronage applied any more - all that mattered was seniority. Once you were "made Post", all you had to do to become an admiral was to outlive everybody else.
Don't say "infinitely" when you mean "very"; otherwise, you'll have no word left when you want to talk about something really infinite. - C. S. Lewis