Gene Slover explains the historical basis for the precedence of ratings among U.S. Navy Petty Officers — an order known informally as “the Pecking Order” — tracing it from the age of wooden ships to the post-WWII shift from Right Arm to Left Arm ratings. The official November 1942 tables are reproduced below.
The precedence of ratings of Petty Officers, or the Pecking Order, is established from the early days of navies of wooden ships and iron men.
It is generally accepted that the first ratings were for the Boatswain’s Mate. Therefore a Boatswain’s Mate is always considered to be first in command if no officer is present.
Thus a 3rd Class Boatswain’s Mate is in command even if a Chief Gunner’s Mate is present.
The ratings were developed as the need arose for someone to perform either a new job or to relieve some of the duties being done by other personnel.
So it went: Boatswain’s Mates, Gunner’s Mates, Quartermasters, Signalmen, and Fire Controlmen.
The Turret Captain’s rank came in the late or mid 1800s but was placed 2nd because this used to be the rank of Gun Captain on the wooden ships. The rating was changed to Turret Captain about 1875.
And so on down the list.
Boatswain’s Mates, Turret Captains, Gunner’s Mates, Quartermasters, Signalmen, and Fire Controlmen wore their rating badges on their right arms and were called Right Arm rated personnel. All other Petty Officers were Left Arm rated and wore their rating badges on their left arms.
The ships of the line steamed in the battle line and were commanded by Line Officers, and therefore the Right Arm rated Petty Officers were also Line Petty Officers.
Shortly after WWII the Right Arm rating badges were abandoned and all Petty Officers then wore their rating badges on their left arms.
This can be said to be the time the carrier took its place as the foremost ship of the line, commanded by Line Officers and Line Petty Officers.
In order to remove some of the ill feeling between Battleship and Carrier proponents, the Right Arm Ratings were abolished and all ratings became Left Arm Ratings.
Even though you started wearing your rating badge on your left arm, you were still considered a Line Petty Officer if your rating was of the old Right Arm rating Petty Officers.
Just a little good old USN history :-)
See also: US Navy Rank Insignia & Rating Badges
Precedence of Ratings of Petty Officers, November 1942 — p. 38 — click to enlarge
Precedence of Ratings of Petty Officers, November 1942 — p. 39 — click to enlarge