I am not a Mason, but my family history goes deep into the Masonic-occult stream.
If I’m remembering right, the founders of the Hermetic Order of the Golden Dawn were all Freemasons and involved in a Masonic Rosicrucian body. So there’s a pretty fat overlay between Freemasonry and certain occult orders. If I’ve botched a detail there, someone can correct me, but that’s my understanding without tearing through the actual history at 9am during my second cup of coffee.
You can see the same framework show up a lot with initiatory degrees, degree/grade ladder, symbolism, ritual in a lodge/temple setting, oaths, secrecy, officers, etc.
That doesn’t mean Freemasonry is “the occult” or a magickal order in itself. It’s its own thing. But the structure is very similar to what a lot of magickal orders later used, so people who are in one are going to recognize the feel of the other, and they wouldn’t be wrong to notice the parallels.
Why do some occultists become Masons? I think it depends on the type of occultist. It probably appeals more to the formal, ritual-heavy types than, say, Chaotes, Witches, etc. That’s just a guess from the outside.
In my family’s case, there was a very dark occult current that ran under the surface and used the Lodge as ready made scaffolding. The structure, secrecy, and respectability were already there, so it was a natural container for them hidden in plain sight. Not implying that’s what Masonry is in general, just saying that’s how my people used it successfully for generations.
There was a time when secrecy was basically mandatory for occultists if you wanted to survive socially or literally. Same with Freemasonry, secrecy was a massive part of the structure. Now that so much information is out in the open and the occult is being de-occulted, there’s less survival need for orders. A lot of people join lodges now for social reasons, networking, or family tradition, and a lot of magicians skip orders altogether. To each his/her own.