Marina: When I was born:
Never was waves nor wind more violent;
And from the ladder-tackle washes off
A canvas-climber. 'Ha!' says one, 'wilt out?'
And with a dropping industry they skip
From stem to stern: the boatswain whistles, and
The master calls, and trebles their confusion.
-- Pericles Prince of Tyre IV.i by William Shakespeare.
The phrase 'from stem to stern' is a reference to the front of a ship, the stem, and the back of a ship, the stern. Hence, from stem to stern includes the entire ship, or, speaking metaphorically, everything.
The origin of this phrase is lost to time, but precedes Shakespeare's time by a good couple of centuries, at least. These days it is most often found in the phrase 'to search from stem to stern', although it can be used in any situation in which one wishes to refer either to the whole boat ("Flush deck: Any continuous, unbroken deck from stem to stern.") or the entirety of pretty much anything ("The office is undergoing a stem-to-stern reorganization").