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.
The rank of Captain, OTOH, does not denote any specific position. On the real-life U.S.S. Enterprise, one man of Captain rank is the commanding officer while the other is the executive officer. They have very different and well-defined positions and areas of responsibility, but happen to carry the same rank. And the same would have been true had Picard and Riker both been of Captain rank, just as it was when Kirk, Spock, and Scotty were all of Captain rank.