The longing for the freedom of life on the sea is a theme that has resonated since Homer (and likely before, told only in oral sagas). In the case of Masefield's famous poem, the lure of sailing over the waves, especially at night, under clear skies filled with stars, is perfectly captured.
The romantic tall ships, with their billowing sails and feeling of flight over the water, are a completely different experience than ploughing through the waves on a steamer or hacking through them on a tanker. But mariners of this era did not have the technology available to sailors today, and relied on the stars to chart their night courses.
This connection with nature is prized by Masefield and celebrated in his poem. Interestingly, naval forces in several places in the world are now reviving the arts of steering by the stars and a sextant, aware that hacking of their navigation systems could leave them blind.