Thinking about Sherlock, I feel like the Mary reveal was meant to be similar to Elementary's Moriarty reveal. Both women are/were in romantic relationships with men who had no idea about their criminal past; both women changed their identities and deliberately lied about themselves; both were discovered only when they were trying to kill someone and both shot their Sherlocks.
The main differences are:
1. Sherlock!Sherlock consistently noticed odd things about Mary (although he never put them together before), then blamed John for marrying her. Elementary!Sherlock never noticed anything strange about Moriarty, showing that even someone as intelligent as he was could be deceived. It also shows that anyone can be a victim of an abusive relationship, whereas Sherlock implies that some people (i.e. Sherlock) wouldn’t get into that situation.
2. Elementary acknowledges the relationship as abusive and, even months later, Sherlock is still clearly dealing with the ramifications (with Joan’s ongoing support). John, on the other hand, managed to come to terms with it off-screen, and it was resolved during the episode. No one else seemed particularly sympathetic to John that his wife was, in fact, a liar and an assassin.
3. Sherlock!Sherlock blamed John for the relationship, because people like Mary are his “type”. Mary’s lies and her past are John’s fault, because those are the kind of people he’s drawn to. He’s completely victim-blamed for marrying a wife who lied to him (even though no one else suspected her either). Elementary!Sherlock, on the other hand, is never blamed for falling for Moriarty - in fact, everyone around him is supportive. It’s clear that Moriarty deliberately (and cruelly) deceived him (and she is only beaten by Joan).
4. In spite of being thoroughly evil, Moriarty has agency. She runs her crime empire; she writes to Sherlock; she chose to deceive and abuse Sherlock. Mary, on the other hand, was forced into her position because she was hiding from someone, was forced to try to kill Magnusson because he had information on her, was forced not to kill him because of John, was forced to shoot Sherlock to save herself/John, and ultimately the relationship was John’s fault, not hers. She’s a completely passive participant in her life (and we never find out what was in her past that could have triggered this - she doesn’t even have past agency).
It was as if Sherlock was trying to do a similar twist, but the writers didn’t understand the characterisation decisions that made the Moriarty twist effective on Elementary. They just saw a hot girl with a gun pointing at Sherlock.