Cargo cults are religions that formed in pacific island cultures when they came into contact with Europeans. They sought to replicate the Europeans' material wealth and technology by imitating it. They didn't know how those things were made, so they thought they were gifts from the gods. They built imitation airstrips and control towers thinking those were rituals to summon planes.
The term cargo cult has also been applied in other contexts, such as cargo cult science or cargo cult programming, to mean imitating techniques and procedures without what they're for or why they're used. I don't object to that usage, because it seems pretty accurate, but it does give a poor representation of cargo cults.
As far as I can see, cargo cults are the most rational religion in existence. They're still wrong and irrational of course. But compared to more mainstream religions like Christianity and Islam, they're downright sane. Cargo cults have real evident miracles.
Airplanes and radios and all sorts of magical things. You don't need to have faith in those things. Their explanation for those things was wrong, but that's not necessarily irrational. The irrational part of cargo cults is refusing to give up that explanation when it fails to work. Compare that to Christianity which is entirely based on irrationality and faith.