Naval tradition, as mentioned above. It may sound odd to people today, but I think back then people were more familiar with that convention, through movies and such if not from actual experience. For instance, Mister Roberts
, who was really Lieutenant (j.g.) Roberts. It used to apply to first and second lieutenants in the US army, too, and is sometimes used correctly that way in old cavalry Westerns. It is still officially correct to address a US Army warrant officer as "Mr." or "Ms."
From my dad's Bluejacket's Manual
, issued 1965: