There are mysteries and there are mysteries.
Mystery (meaning a "puzzle") is a Middle English word derived from the Latin mysterium, meaning a "secret rite" or "initiation."
The medieval Catholic Church taught—and still teaches—that Jesus' life was an amalgam of mysteries, inexplicable to mortals, but worthy of contemplation. It used the Rosary to catalog these puzzles. A mystery meant an event in the life of Christ.
In the Eastern Orthodox Church, mysteries was the term used to name the Seven Sacraments. So, for example, marriage was a mystery. (I can buy that.)
But mystery had a secular meaning, too, at the time.
A mystery meant an occupation, a trade, or a guild.
So, for example, the Worshipful Company of Fishmongers, the guild for the retailers of fish in medieval London, were referred to as a "mystery."
They dictated who could sell fish in London and who couldn't; set all prices for their goods; and ran their own courts of law to settle disputes between sellers and suppliers.
The fishmongers, for example, fixed the prices for soles, turbots, herrings, oysters, and eels. They also forbid wholesalers from selling fish directly to the public; outlawed the selling of fish indoors; and prohibited the sale of any fish except salted ones after they were two days old.
The mysteries were also inordinately wealthy. They owned and ran their own apprentice programs, private schools, hospitals, poorhouses, and colonial plantations.
We echo the medieval mysteries' power today whenever we speak of guarding "trade secrets."