A term for the phenomenon borrowed from anthropology and later popularized by physicist Richard Feynman is cargo cult, originating in studies of religious rituals observed on various Pacific islands after the Second World War.
During the war, these isolated and technologically primitive islands suddenly saw an influx of thousands of American soldiers and vast quantities of supplies and war matériel appearing out of nowhere, and then disappearing as Imperial Japan's perimeter shrank and the war drew to a close. As described by Paul Raffaele in a February 2006 Smithsonian Magazine article entitled "In John They Trust" about such a cult on Vanuatu:
The locals don’t know where the foreigners’ endless supplies come from and so suspect they were summoned by magic, sent from the spirit world. To entice the Americans back after the war, islanders throughout the region constructed piers and carved airstrips from their fields. They prayed for ships and planes to once again come out of nowhere, bearing all kinds of treasures: jeeps and washing machines, radios and motorcycles, canned meat and candy.… [A]lthough almost all the cargo cults have disappeared over the decades, the John Frum movement has endured, based on the worship of an American god no sober man has ever seen.
(the theory behind the name John Frum or John Fromme is that the islanders interpreted an introduction as the name: Hello, I'm John from Dubuque, and this is John from Pensacola).
--
Since then, the term has been appropriated and snowcloned by others. The most famous use is by Feynman warning against cargo cult science in a 1974 CalTech commencement address, referring to
research that never seemed to yield provable results, but acquired public acceptance because they possessed the veneer of rigorous methodology
(Hiltzik, Michael. "More on the crisis in research: Feynman on 'cargo cult science'," The Los Angeles Times, October 28, 2013)
Another use is cargo cult programming, referring similarly to the ritual insertion of code, libraries, structures, etc. by a developer even though they serve no purpose. It is a half-step away from voodoo programming. Extended to management, Steve McConnell has described cargo cult software engineering as the attempt by software development firms to emulate more successful ones by requiring long hours and unpaid overtime of their developers— though those are the effects of motivation in the successful shops, not the cause of success.
Cargo cult politics, cargo cult journalism, cargo cult dieting— try a web search on any field or interest; there is probably someone condemning cargo cult behavior in it.