Rank has nothing to do with technical skill.
A good officer should be able to be planted into any department and thrive.
It's about (human) resource management.
How many crew/officers your superiors think that you're competent enough to give orders to/take responsibility for.
Compare it to learning to juggle.
Petty officers can juggle 3 balls, Ensigns can juggle 5 balls, and way up the top of the command pyramid there are admirals juggling a dozen working turned on chainsaws.