Basically, the facts are these: (a) Baby Girl Watson is born healthy, but (b) John is clearly not the father. (c) John and Mary go on to get a divorce, and (d) in explaining the divorce, John points to the divorce as providing the "why." Like I said, it's a minor part of the story, and I can easily see the author not feeling John could publicly give the "real" reason and just not making that explicit because it would be more trouble than it's worth.
Still, the basic idea strikes me as really very sexist. I'm not saying the author is, or that you can't write a story where John divorces Mary and ends up with Sherlock, even one where you don't speak of Mary in positive terms and even even where the divorce is spurred by learning Baby Girl Watson isn't a Watson after all. But I'm afraid I'm stuck on the basic idea - that this of all things would be the uncrossable bridge, and as I said, it just feels retrograde. I mean, Mary killed people. She did it because her government told her to and then she went freelance. There's a screenshot floating around of Mary's file, I think from Magnussen's mind palace (though I can't find it now, sadly), where there's Cyrillic text, suggesting her other employment wasn't just going freelance but becoming some kind of a traitor. She shoots Sherlock and the best spin I can put on that scene is she ran in such dangerous circles and took such risks she got in a position where she had no better choice than to do something that had a very real risk of killing him. She lies to John about who she is through their entire relationship, and then she puts Sherlock and John in Magnussen's path, and with the deleted scene we've now all seen [video], that's more than a bit not good. John has about a half-dozen reasons to want to be free of her, and really, I'm just getting warmed up. :-)
So it's not that I have a problem with the idea that John and Mary get divorced, it's the idea that after all that it would be being cuckolded that pushed John over the edge. The idea seems to be that Mary can kill people and put John and Sherlock in danger, but the one unforgivable sin, the one thing a female character just cannot do and move past, is to not be sexually faithful to her man. This is particularly hard to swallow in the wake of the Stag Night, where I'm fairly sure John would have had his own bout of infidelity if Tessa hadn't turned up when she did. (And thank goodness for that! As a Johnlock shipper, I'd much rather they do it right and honorably, not as a one-time fling.) So if Mary did take that step, well, that's certainly not good and one more reason why I think she's not a good match for a man who's supposed to be morally good.
All of which has me wondering how we should think and write about female characters, particularly ones who are morally grey. This isn't a problem limited to Sherlock. In Tolkien I read mostly the canon pairings because they made sense to me and I emotionally connected to them, but I know people who did prefer slash, Diamond of Long Cleeve has taken a bit of a beating over the years, and I'm fairly sure Arwen and Eowyn have as well. When you have a character like BBC!Mary, who isn't only morally grey (at best) but who also doesn't exactly feel fresh-faced and pitiable, it's all that much easier to paint her as a first-class hag, and I think that's a problem. But I'm also not sure panting her as without flaws is the way to go, either, because that says a woman can't have any flaws (certainly not flaws she's held accountable for), outside of ones where she wrongs her dearly beloved in the context of the relationship. So... I don't know. This kind of move, to have sexual infidelity be the thing that drives John over the edge, definitely feels off to me, but I'm not sure what the better option is.
So I'm curious. Have you written (or read) Mary, or any female character in a similar position, in a way you thought worked? How do you thread that needle?