Previous to that, 'Petty Officers' lost rank and pay when a voyage ended and the crew paid off. Chief PO was introduced to address this problem, make the rank permanent and improve pay and conditions.
Was it similar in the US Navy? I know RN/USN crews had similar ranks. When the rank CPO was introduced in the RN, it replaced several other ranks such as Master-At-Arms, Boatswain's Mate etc.
Master-at-Arms and Boatswain’s Mate are jobs, not ranks. The Master-at-Arms is the ship’s sheriff, usually a CPO or a Warrant Officer. A Boatswain’s Mate (E-4 thru E-9) is a supervisor of deck hands and expert in rigging, maintenance and cargo handling. The Boatswain is usually a Warrant officer or a senior/master chief.