Since they do live among us (Part I), and there's a degree of secrecy to it (Part II) -- why, exactly are the magical living in hiding in the contemporary world? From their viewpoint, not the writer's?
Various writers used various reasons over the years. Some are better than others, most are reasonable in some circumstances, but only if those circumstances are provided.
One that used to be popular was that no character whose point of view is shown, or who would tell the truth, knows what the reason is, or how the masquerade works.
In many older stories, the magic never got a point-of-view and never confided in the main character. All those tales about a little shop that wasn't there yesterday, and after changing your life by selling you something, will never be there tomorrow -- the proprietor might know why his store can appear and disappear without so much attention, but you never will.
Nowadays, that one is less common. Since magical points of view are more common, it tends to be something that even the magical characters don't know. Notice how, somehow, in Dresden Files, Harry Dresden's moving the T-rex skeleton by necromancy got explained away by the mundanes. His advertising in the phone book doesn't really dent the disbelief.
An approximation of this can be pulled off if the characters themselves don't think much about it. They're hired to put down the dragon quietly and as long as they get their pay they don't ask too many questions. They're children used to adults doing things for their own reasons. But it takes careful characterization, and positioning of the characters.
A much more common reason nowadays is that the magical beings do it for self-defense from the mundanes. Which is the most ludicrously used.
To the extreme that societies of arrogant, super-humanly powerful beings with a love of dangerous situations often use it. (Particularly in paranormal romances in my experience.) That is, characters who would be in no real danger, and who would love it if they were -- and who generally would not think of the more helpless members of their society, if such beings even exist.
Worse when they have many short-sighted characters who would love playing pranks (or worse) without thought of the consequences.
If you want the magical characters to have to defend themselves from the mundane by hiding, you need some very good reason why they are in such grave danger, and why they took this route to do it. Notice how in Harry Potter, the children are taught that witches and wizards were in no real danger from witch hunts, and either that is a lie, or some other problem inspired the withdrawal.
The arrogance could work into it, in that they do not want to have to deal with uppity mundanes, but that would require specific kinds of arrogance. (Phoebe And Her Unicorn has unicorns who are intensely vain and protect themselves from mortal attention with the Shield of Boringness. That one works.)
Or the uppity mundanes might meddle in the laws and customs of the group. Tell them their king and queen can't claim to be royalty here. Insist on trial for the guilty. Demand the end of blood feuds, trial by combat, and dangerous education for children.
That does require that the uppity mortals be a real problem, and consequently that the power levels not be too different.
The self-defense is the most attractive to the clever and crafty, the timid, and the weak. Obviously the latter two groups have extremely difficulty pulling it off. The first group may have extremely difficulty enforcing it, being quite likely outnumbered or of lesser power. They would need to be very clever and crafty.
Perhaps a decrease in magic, or an increase in technology1, encouraged it. Those who lorded over the mundanes are angry that they can not pull off the same level of control with their power less and withdrew in disgust -- and forced anyone not in agreement to withdraw just the same. A limited number of places on Earth where it is feasible for magical beings to live does inspire a certain degree of protectiveness about them.
Oddly enough, it is seldom, if ever, done by those in power in order to keep a better grip on those they control.
The flip side of this is the case where the reason is the protection of mundanes from magic. This can be the motive of all sorts of beings. In my experience, this tends to be something humans do -- mundanes or wizards or both working together.
The aspect of removing magical elements from where they can harm mundanes is rather obvious. Keeping the mundanes in the dark is less so. How can they defend themselves in their ignorance?
L. Jagi Lamplighter's Prospero's Children series handles it elegantly. Many magical beings are willing to leave mundanes alone as long as mundanes do not pester them. Furthermore, it is possible for anyone to master magic, but this generally requires a bargain with a being that -- really you just shouldn't make bargains with such a being. At that, once you stop groveling before the Lord of Flies to contain typhoid, you can invent screen windows and anti-typhoid drugs. The group doing it carefully recruits those who find these noble ends, noble enough to justify their ruthless means.
Other writers often use it much more vaguely because they have not thought it out.
Another reason lies in the magical beings hiding from each other. Once the Mist in the Percy Jackson universe was explained, it became clear that a number of pantheons existed without colliding with each other. Such collisions would be of such power that even gods would avoid them, and the Mist lets them avoid quibbling on a day to day basis.
That one could be an agreement, but others are possible.
A blood feud, perhaps. If werewolves and vampires do have that cliched conflict (found only in modern works, by the way), werewolves and vampires hide from the mundanes so that the mundanes can not betray them to the other side, with the added bonus of making hunting easier.
Most of the stories are of self-defense in one form or another, but the precise form and the motive for seeking it are crucial in making it plausible.
Technology vs. Magic -- Really?
One thing in world-building is that a lot of writers -- particularly those with cross-world travel in their worlds -- say that magic does not work in technological worlds, just as technology does not work in the magical world. Just because the world's technological.
I liked Joyce Harmon's Regency Mage series for the motivation of the Masquerade.
Basically, the children of Magicians are very likely to be not magicians so centuries ago the mundanes kill the magical children since those children were not able to defend themselves as well as adult magicians.
So the magicians went secret and "rewrote" history so people would believe that magic was "just silly stories".
Of course, there was the major problem that this happened world-wide which can hard to accept.
IE All magicians who were very willing to fight other magicians were Now Willing To Work Together To Hide Magic?????
An idea I had: they need to hide to preserve their power, e.g., anyone could learn magic but the mages would rather not share.
Admittedly, this kind of world building tends to shade into the conspiracy genre.