Psychosis involves the seeing and hearing of things which are not really there. In the case of primitive societies, the psychotic was sometimes seen as the possessor of special powers and abilities. They often became the shamans and priests. A valued position in society was undoubtedly good for the psychotic and probably helped that person, but the enshrining of delusion and hallucination as the basis for conventional wisdom was bad for society as a whole. Looking at the philosophers and divines we have in modern society, I doubt much has changed in this regard.
Mind Altering Techniques like meditation, prayer, fasting, various drugs (alcohol, hemp, several species of mushrooms, tobacco, breathing exercises, and on and on) were and are a way to shut off rationality to become more, well, more like a shaman.
Economics. The earliest "temples" we know about were the governmental and economic centers of a village or city. The further back we go the more the "temple" records resemble accountants ledgers and the less they look like holy works. The early temples were facilities dedicated to the worldly matters of government, trade, and science and not to matters spiritual or supernatural.
Drama. We all like a good show. Special costumes, chants, dances, drugs, fancy effects and so on and on. It is theater. Considering the near universality of plays and play, mucking around in fantasy and ritual is probably a basic human need.
Magic. What we can not modify we often will attempt to
fantasize a way of changing. Between mental illness, coincidence, and random
(and mindless) reinforcements of random human activities many have come
to believe that certain movements, sounds and words would somehow change
reality. What is prayer, the lottery, Tarot, religious services in general
but belief in magic?