I think for one thing US Navy aircraft carriers carry many more personnel onboard (5500+) thus necessitating two Captains due to the larger number of people, departments, functions, etc. to oversee.
The Starfleet Enterprise I think maxed out at about 1000-ish crew members, and correct me if I'm wrong it was the largest class of ships in the fleet so two Captains would have overlapping duties & areas of responsibility in normal circumstances and would also make the Captaincy less prestigious.
Of course I do realise that the Galaxy-class ships carry out many roles for the Federation such as exploration, defence, diplomacy, scientific research, first contacts, etc., but still two Captains onboard seems overkill and I never liked that concept. Furthermore Starfleet Academy is an institution that is extremely difficult to get into so even achieving the rank of Commander would be considered an impressive feat.
It seems to me like you're conflating the position
of Captain and the rank
of Captain. The position is more formally called "commanding officer" and does not necessarily mean that you are of any particular rank. Someone of Commander rank could be the commanding officer, for example.
As with Cmdr. Sisko in DS9 S1-3. Or later, Lt. Cmdr. Dax (who kept her teal uniform!) on the Defiant when Sisko was (at the time) permanently reassigned to an Admiral's staff in S6.
(Of course, the Defiant was a small ship, with somewhere between a tenth and a twentieth of the E-D's crew complement, and DS9 itself didn't have a big Starfleet crew complement in the early days, which is why it was fair that a non-Captain was the CO in each case. Still shows that a CO/"captain" and a Captain are different things)