This has nothing to do with mast, which is also very much a marine term, and alludes to those vertical erections over the main deck, which have been those supports for sails in older ships to various tower-like installations for telecommunication or other purposes in modern vessels.