Allied military forces brought a wealth of food, clothing, medicine, and tools to remote Pacific islands during WWII. The indigenous populations observed soldiers performing rituals (building runways, marching, drilling, radio operations) shortly before planes and ships would arrive with valuable cargo.
When the Allies left, the islanders performed the rituals to get the cargo back. They built runways with fires along the edges, built replica planes and radar dishes out of straw and wood, carved wooden headphones and sat in wooden control towers, and marched in formation with wooden rifles. These so-called "cargo cults" exist to this day.
Following the superficial form of something, because it’s correlated with some outcome you desire, is “cargo cult” reasoning.