There's a marvelous video [1] that Dan Olsen of Folding Ideas did as a deep dive into the community of Flat Earth and how it manages to survive. The TL;DW (though it really is worth the watch) is that people both want and need community, and all communities have ways of signaling that you belong to them. Sometimes it's language, sometimes it's clothes, sometimes it's behaviors--the "qualifications" vary wildly by group, but in many cases from the outside the exhibited behaviors of a group (e.g., believing in flat earth) don't jive with the rest of the perceived individual (e.g., scientifically literate) until you factor in that the behaviors don't have to matter beyond ensuring membership to a group.
A whole lot of things make a lot more sense to me when seen through that lens, including a lot of organized religion. People just want to belong, and often the "price of entry" is inconsequential vs. the payoff of belonging somewhere.
Thanks for sharing your story. It helps me to understand the "Why" of some of these things, and helps me feel more connected to my fellow beings.