'The Power of Ritual in Prehistory: Secret Societies and Origins of Social Complexity' by Brian Hayden is a super interesting read on the origin of secret societies. Apparently there has always been a dynamic in communities that whenever there is a production surplus (according to the author happens in 'transegalitarian societies'), there tends to be a very small number of individuals that feel entitled to the surplus so they start to create multiple secret society startups with rituals and initiation practices often involving a high initiation cost to eventually centralize power (and publicly punish skeptics when possible).
Another characteristic about secret societies is that actually they need to be very public (to get new members), and what is a secret instead is the reason why the society exists, that part is not revealed unless becoming part of the group.