Ah, but you see, the various military services do that on some scale every day – that is, attach someone to a specific mission and place him under standing orders to follow the instructions of those in charge of that mission, whether or not they’re from his service. The military officers in the NASA astronaut corps essentially receive orders from their service’s command telling them their current duty is to serve as an astronaut and attaching them to NASA for performance of said duty.
Contrary to earlier mentions, there WERE pre-Apollo flights with different-service officers: the first 2-man US flight, Gemini-3, had Grissom (USAF) teamed with Young (USN); Gemini 5 had Cooper (USAF) with Conrad (USN); and so on…
In a NASA space mission, you’re doing a job for a civilian agency, and your hierarchy and place in the totem pole is due to your own standing in the Astronaut Corps and to requirements specific to the mission: Mission Commander, Pilot, Lead Mission/Payload Specialist, ordinary Mission/Payload Specialist (in Russian flights insert into the list Flight Engineer and (lately) paying tourist); the people in charge of personnel management will seek, when using military personnel, to avoid having those senior in rank occupy a junior billet. In the phrase “Mission Commander”, the second word is NOT the designation of a military or paramilitary grade of rank(), it’s a job description.* It’s the man or woman in charge of doing what it takes on-the-scene to make the mission succeed.
(*TWO American ranks use the word “commander” in the rank name: “Commander” and “Lieutenant Commander”, corresponding to grades O5 and O4 of commissioned officer in the seafaring services: Navy, Coast Guard, USPHS and NOAA. The rank of “Commander” is NOT the same thing as the job, of commander)
The constant use of CapCom/Mission Control in spaceflight is due to the environment having started as, and still being mostly, that of experimental operations/test flight, where it is normal that the performance parameters will be monitored continuously from the ground, you have a programmed routine of what should happen, must get permission to deviate voluntarily so people know what to expect, and you have this extra pool of knowledge to fall back upon if you have the time to ask for assistance. As exemplified earlier, “command” as such is exercised only in extreme situations in that environment; and, since up until today we have worked with extremely small flight crews, it looks more like the “captain” of a bomber than that of a frigate. (On a small vessel such as a PT-boat, you’re likely to see the “captain” doing the steering and navigating hands-on, too). If things ever got to the point where a spacecraft can reliably operate with the ease and autonomy of your average ship or airliner AND with the size of crew you get on a mid-sized ship, you’ll have less need for CapCom to be piped in all the time and the commander will start behaving more like a ship’s skipper.
The actual rank titles and precedences in militaries and paramilitaries are established by the traditions of the various spheres of operation wherein they are used. In militaries (and in paramilitaries that do a lot of work together with the armed services, such as are the USPHS and the NOAA Corps), tradition and the frequent necessity for coordinating meaningful interactions have led to an overall standard understanding of scales and relative positions across countries (between one same country’s services, the equivalencies are most oftenset by law). A squad leader will be something from corporal to staff sergeant; company commander will be somewhere from first lieutenant to major; the officer in charge of a large heavily armed surface warship will be a commander or captain – or rather they will hold such ranks/grades *as are translated into American English according to a customary standard * in those terms.
When you go into civilian entities, things get fuzzier – For instance, airlines borrowed the terms “captain”, “first officer” and “second officer” for the pilot, copilot and flight engineer, and “purser” and “steward(ess)” for the cabin service staff from the preexisting language of shipping, mainly because they made a good match for the tradition of a merchant captain being responsible for the “ship” and all lives aboard it, and needing for it a clear chain of command. Thing is, the “captain” of the 30-seater doing a short-hop to Utica on a local charter carrier and the “captain” crossing the Pacific on a Qantas 747 have similar legal responsibility but different degrees of training.
Police forces vary widely in this – depending on where in the world you are, “Inspector” can be anything from the 2nd-in-command of a major city department to the guy immediately above the street cop. Also, very often you will see county Sherriffs or city Police Chiefs in the USA, who command departments of maybe a couple hundred men, wearing the 4 star insignia that in the US military signifies a full O-10 General. Why? Because in each case they can call and dress themselves as they choose.
(BTW, folks, do not let anyone actually in the Coast Guard hear it be said they’re not military.)