Re: does a starfleet ship always have a CO with the rank of captain?
^ I suspect that the reason we see so many Commodore-rank ship captains in TOS was to distinguish them from Captain Kirk. The audience would need to know who is the senior officer, and they couldn't (or wouldn't) take the time to think about it if they were the same rank. So for example, it's important to the plot that Decker (in "The Doomsday Machine") is senior to Kirk, so the writers made Decker a commodore so the audience would immediately realize it.
"If the world was perfect, it wouldn't be." - Yogi Berra