I handled a firearm exactly one time over 5 years while in the Navy and that was in boot camp. No need to any other time since I was in a technical field.
And those firearms were .22's. We did have several onboard who were armed. One Supply {Storekeeper} who went around collecting the reciepts from the ship stores, the Dp's in the check cashing line, and MARDET. With MARDET armed responses were very fast. LOL.
On Subs while in port I think Petty Officers on Watch at the brow is or was armed with a sidearm. The military in all branches needs to go back to being it's own security.