As the thread title suggests, the more I think about it the more it seems to me that Starfleet isn't the U.S. or Royal Navy in space. It is the U.S. Coast Guard in space.
In the U.S. Coast Guard, there are many small boat stations and small cutters where there are no commissioned officers and the station/cutter is commanded by a Chief or a warrant officer. There even, I believe, some larger cutters where the chief engineer isn't a commissioned officer but a lifelong enlisted man who has spent his career fixing engines.
When (most) people join the Coast Guard, they are sent to a cutter or station right after basic training and work for as long as two years before heading to school to be trained for a specific job. Some are called Seamen and work on the boat deck. Some are called Firemen and work with engines. The rest become Airmen and work at air stations. But on a cutter or at a small boat station, seamen and firemen can all go on boarding parties, and apply for or even serve an apprenticeship for any available job. Those that end up as Boatswain's Mates (BM) continue to work on the deck, lead boarding parties, navigate the boats, etc. At some point, a BM who makes chief may become eligible for command.
Starfleet has shades of much of that, at least to me.
- If nothing else, Stafleet's mission of law enforcement, defense, search and rescue, humanitarian aid, science, etc. is not all that different from the Coast Guard where a ship can arrest smugglers one day, escort a missile submarine the next day, and protect fisheries on a third.
- Junior Officers (including Worf, Wesley, LaForge, Chekov) are given command uniforms and then allowed to work in several departments until making a decision. They are not all that different from first and second year Coast Guardsmen working under a BM before choosing/being assigned a rate.
- People stay in the career field and move up the ranks that way. A Coast Guard enlisted engineer never has to move into another job to be promoted. Scot and LaForge can stay as career engineers because they are not expected to move up into command despite their ranks. Though I understand that there are a few navies that have engineering officers who don't ever take command of the boat.
- Though I admit it makes no sense on a ship with a crew in the hundreds to send their command cadres on every single away mission, Coast Guard leaders will often lead boarding parties to keep in practice. I also remember a few years ago that the commander of the local Coast Guard station was fired in part because it turned out that he could not drive all of the boats at his station. Apparently, at least in some part of the USCG if you cannot perform a mission you cannot lead that mission.
If you can get past the fact that there are seemingly few enlisted men (which I can by thinking police officer when someone calls himself a Starlfeet officer) and the fact that mid-career changes in specialty happen, Starfleet seems more like the Coast Guard than the Navy.