When Captains Kirk, Picard, Janeway et al ventured out into the dark emptiness of space, they had a light to guide them in their interactions with any new races that they might encounter. This guiding light was 'The Prime Directive'. Actually, thinking about it, Captain Kirk might not have had this. My trekkie experience is strictly limited to what my Dad made us watch at dinner time. No. Really. All 'Star Trek' watching was strictly involuntary on my part. Although, thinking about it, the Borg were quite cool, just because they so beautifully represented the American fear of communism.
Anyway. The reasoning behind the Prime Directive was many-fold I'm sure, but I suppose it could be summed up as the prevention of exposure of cultures to levels of technology that they have failed to achieve themselves, so that they are not unduly influenced by the encroachment of the Federation upon their home world, or other such paternalistic nonsense. I don't know, I was usually having an argument with my father about why we couldn't watch Channel Four instead to pay too much attention to the intricacies of travelling the voids of space. They had a point though; the evidence of what happens when a relatively undeveloped culture is exposed to a relatively developed culture is seen throughout history. One of the more interesting results of this meeting was the proliferation of cargo cults in the late nineteenth and earlier half of the twentieth century.
The White Man cometh
To be fair, if you'd spent the vast majority of your life living in a leaf hut, spending your daylight hours hunting for food and the night dancing away the evil spirits, you'd be quite shocked by the things that we take for granted. Like airplanes or ships that rocked up to your island loaded with food, liquor and guns. They'd never been seen before, and suddenly these waetmen had appeared, built a flat strip of earth or a wooden platform on the sea, and before you know it, luxuries the likes the natives could only dream of began to arrive in vast quantities. And, thus, cargo cults were born. Cults who believed that the cargo arrived by the blessing of supernatural sources rather than being of man-made origin.
Cargo cults were primarily a Melanesian phenomena (a racial group found in the South Pacific islands that include Papua New Guinea, the Solomon Islands and Vanuatu), although they have been seen in other parts of the South Pacific, and in some parts of Africa. The term 'cargo cult' is actually an umbrella term for the large number of different belief systems that sprang up; the meeting of Christian teaching about a God who provides those of true faith and the materialist Melanesian culture was a potent, and ultimately destructive, combination. The specifics of beliefs varied from cult to cult. Some believed that the End of the World was come, heralded by blessing of goods delivered to the people by tribal gods or ancestors. Others believed that the Europeans themselves were the divine channel through which the blessings would appear. However, because the Europeans kept receiving all these goodies, but failed to distribute them amongst the indigenous tribespeople, some believed that the waetmen were actually stealing items that were intended for the villagers. Well known instances of cargo cults include the 'Tuka Movement' in 1885 in Fiji and the 'Vailala Madness' in 1919 in Papua New Guinea.
Unforeseen effects of the war in the South Pacific
A sudden proliferation of cargo cults occurred during the Second World War, when heavy fighting between the Allied Forces and the Japanese was focused in the South Pacific. Daily, hundreds of planes and ships would deliver munitions and supplies to bases throughout the region, and, what with battles being fought left right and centre, the indigenous people could not be blamed for thinking that the end of the world was nigh. After the war ended, the planes and ships stopped arriving, the airstrips and ports were abandoned as they were no longer necessary, and the tribes people were left scratching their head as to why. The Europeans came, went to great effort to flatten strips of land, shuffled various bits of paper, and then the metal birds full of cargo landed. If you think about how they only got to see one end of the picture, you can understand how their train of thought missed a few vital destinations.
The same way that a laboratory rat will press a lever that results in food being bestowed, villagers assumed that the reason that the cargo was delivered was because of the rituals that the Europeans and Japanese would perform. So, they began to level areas of soil to resemble airstrips. They built replica airplanes from straw in the hope of attracting real planes to land. They carved replica headphones out of bamboo. They built huts for 'officials' to sit in, wearing mock uniforms of their own design. They gave these officials leaves to pass between themselves as a substitute for pieces of paper. Strangely enough, the cargo never came. However, the practising of this belief system caused a breakdown in the old beliefs and ways of doing things. Sometimes, the damage was more than cultural; some prophets ordered the destruction of all the villagers' material possessions, including their gardens and livestock, as there would be no need for these when the cargo arrived. One particular cult that pushes this belief is the Jon Frum cult in Vanuatu, which still flourishes in the area, who believe that Jon Frum, a mystical god-like figure, will arrive on the 15th February with his cargo of material wealth to distribute amongst the islanders. Which 15th February has yet to be specified, but every year on the 15th February, believers make an offering of prayers and flowers to a red cross (the symbol of Jon Frum) hoping that this year is the year. The Prince Philip movement is another cargo cult that formed in Vanuatu (which is obviously the hot-bed for this kind of thing) after Queen Elizabeth II visited the island in the 1960s; it wasn't believed that a woman could be the leader of cargo suppliers, so they focused on Prince Philip instead as being the man for the job. Attempts have been made by Australia and other countries to quash the cargo cult beliefs; one cult leader was even flown out to Australia to see the cargo loaded onto planes by other humans, and weren't the product of a divine being.
Modern usage
The term 'cargo cult' is now used as an analogy to describe any practice where someone imitates a process rather than understanding the reasoning behind it. Examples include 'cargo cult programming', where purposeless lines of code are included in a programme out of some misconstrued belief that it is a necessary fix for a bug. Richard P. Feynman also used the term to describe those who use pseudoscience to publish studies that actually have no scientific worth in terms of knowledge.