The story
From the fact that since many vehicles such as carriages, coaches, wagons, prime movers, and trucks generally have four wheels on which they move, this component which resembles a wheel is the fifth. * (anything superfluous or unnecessary): Sense 3 refers to the fact that a fifth wheel is not needed for a four-wheeled vehicle to operate.
Etymology from Wiktionary, CC BY-SA 4.0.