Nautical miles are a fun unit. They are one minute of arc of the earth's surface (idealized), so it makes sense why they took hold in the two forms of travel that regularly travel great circle routes.
(Earth isn’t a sphere so it’s not exact, but it’s pretty close)