It's mostly a case of "A woman's place is in the wrong".
SAHMs are judged for being leeches, lazy, setting a bad example, etc.
WOHMs are judged for farming out their children and putting themselves first.
Women aren't allowed to be right.
The reality is that some people have the freedom to make the choice to work or be a SAHP (I'm in the latter group), and some people don't have the choice due to their circumstances.
When DH and I were first married we both had boring office jobs neither of us enjoyed. I didn't care because I wanted to be a SAHM when we had children. DH worked out what he wanted to do, and I supported him through university while he got his second degree, which was more vocational than his first.
Now I SAH with our children while he works in his good career that he loves.
My children are school-aged now, and because I am at home we've been able to make the decision to home educate them, which works for my DCs.
My DCs, all of whom are girls, know that they can be what they want when they grow up, be that a SAHM or someone who works outside the home, whether or not they have children themselves. At this time my eldest doesn't know what she wants to do, my middle wants to be an astronomer, and my youngest is into fashion. They're still little, this will change.
The most important things parents can do for their children (apart from love them), whether they have a job or not, is help them find a path that makes them happy. Giving them choices through opportunities as much as they can.