Cargo cults are a fascinating phenomenon in pre-industrial societies that have come into and then lost contact with more technologically advanced cultures. The most famous ones sprung up in the South Pacific after WWII, but they've existed for centuries.
Islands in the South Pacific played a key role in the war between US and Japan, who frequently air-dropped food, weapons and other supplies to aid their troops. This cargo often ended up in the hands of the islanders. Then, as you can imagine, when the war ended, so did the cargo drops.
The islanders, by that time, had come to perceive cargo as the root of the Western and Japanese wealth and power, and ascribed the air drops to blessings for ritualistic practices. So what did these cargo cults do? They copied the soldiers.
The built air strips, control towers out of bamboo and planes out of straw, and even mimicked airplane sounds in the hopes that, by following the "rituals" of the soldiers, they too would be blessed with cargo. They marched with bamboo spears cut in the shape of guns and carry American flags like soldiers on parade.
In a nutshell, they went through the visible motions without taking into account any of the underlying principles. Some of these cults still exist today, most prominently the "John Frum" cargo cult in Vanuatu. (It is rumored that they named their cult John Frum after the frequently spoken introduction from soldiers: "I'm John from Cincinnati, John from Alabama" and so on.
Since then, the phrase "cargo cult" is frequently applied to both science and design. Richard Feynman defined cargo cult science as science that goes through the motions of scientific investigation without any critical thought. Similarly, cargo cult programming is defined by The Jargon File as:
A style of (incompetent) programming dominated by ritual inclusion of code or program structures that serve no real purpose. A cargo cult programmer will usually explain the extra code as a way of working around some bug encountered in the past, but usually neither the bug nor the reason the code apparently avoided the bug was ever fully understood.
Smashing Magazine has a great article about how "cargo cult" thinking has contributed to the slow erosion of creative design.
Best trivia of all? Serge Gainsbourg wrote a song about cargo cults!
"I know of the the magicians who call to jets
In the jungle of New Guinea
They scrutinize the zenith coveting the guineas
That the pillage of freight would bring them
On the sea of coral in the wake of this
Machine those creatures not deprived
Of reason those Papuans wait for vapour
The wreck of the Vice-count and that of the Comet"