Maybe its a classic situation of failing upwards. They suck too much to keep a ship of people alive but not enough to be kicked out of Starfleet, well they are getting into their sixties, what do we do? Promote them I guess, unless it's Harry Kim.
Meanwhile the ones that are amazing at their jobs like O'Brien are stuck at Chief Petty Officer.
They did that one time on Undiscovered Country. I guess that was a Klingon ship though.