Cockpit seems a rather strange choice to denote the pilot’s compartment on an airplane, but once the semantic history of the word is known, all becomes clear.
Cockpit originally referred to a place for cock-fighting, literally a pit for fighting cocks. Thomas Churchyard writes in The Worthines of Wales (1587):
The Mountaynes stand...In roundnesse such as it a Cock pit were.
Shakespeare used the word to refer to a theater and in the 17th century there was theater in London with that name. From Henry V (1599):
Can this Cock-Pit hold The vastie fields of France? Or may we cramme Within this Woodden O, the very Caskes That did affright the Ayre at Agincourt?
In the 18th century, cockpit entered naval jargon, denoting the junior officer quarters on the lowest, or orlop, deck of a ship that doubled for the surgeon’s hospital during battle. Presumably, this was because the midshipmen, like roosters, would get into fights with one another. From William Falconer’s 1769 An Universal Dictionary of the Marine:
Cock-pit of a ship of war, the apartments of the surgeon and his mates, being the place where the wounded men are dressed.
In 1914, the term was applied to airplanes; from the Reports and Memoranda of the Advisory Committee on Aeronautics:
There are several speed indicators...in which the pressure of the air in the cockpit is allowed to act on one side of the recording diagram.
So the literal sense gave way to a naval metaphor, which was later applied to airplanes.
(Source: Oxford English Dictionary, 2nd Edition)
Copyright 1997-2014, by David Wilton