I'm looking at the tin art of my Windjammer, Sextant, Black Frigate, and John Marr, as I type.
Some practical / situational answers were already suggested:
(1) sans the opportunity to occupy his time in all the ways that landlubbers can, the sailor smoked.
(2) ships laden with cargos of tobacco from the New World sort of invite the use of that with which they are laden.
These are almost certainly true answers of a certain question. But I'm not sure that they are answers to your question. Your question is of the poetic sort. Why is it that the shade of sehnsucht evoked by the sea seems so fittingly adorned by pipe smoking?
Realistically, the historical fact that sailors smoked (perhaps for the reasons mentioned above) contributes to the association in our mental imagery.
But having said that, have we said all that can be said? Does the association in our mental imagery owe nothing to anything other than that history?
Is it in any way supported by a deeper association? I think so.
The sea in its vastness and power -- and in its mirroring of the firmament -- evokes in us a memory of The Transcendent.
Pipe smoking, for its part, is a deeply personal incense, offered upward, toward The Transcendent. It strikes me as more personal than incense offered from a censer, because, having taken it into yourself, you exhale it out from yourself. Remember that the Hebrew word for "breath" and "spirit" is the same, and that God "breathed" life into Adam. Incese that we breathe out is as our very spirit, offered up out of ourselves to God.
The sea, as the second greatest type of The Transcendent (after the heavens), is fittingly associated with pipe smoke, a uniquely meaningful type of our prayers, our very soul, offered up to The Transcendent.
That's my initial stab at an answer. Now to pick one of the tobaccos I mentioned in my first line and find some Youtube loop of waves and seagulls and creaking ropes and the slap of water against a hull, so that I can pretend for a moment that I'm not landlocked in the upper midwest...