Yes I think it's usually about compromise and the opportunity cost of staying at home versus working.
Some women literally can't afford to work because the nursery care is more than they earn.
Some women are married to very high earners and they know that any money they make, even if it's a fairly good salary, will be largely invisible in terms of the family finances. So they feel that they can contribute more to the family by being at home.
Some women are SAHM because of cultural expectations.
Some families have DC with complex needs, lots of children or are carers to elderly relatives etc. The loss of salary does impact the family but they decide on their priorities and "cut their cloth" accordingly.
There are SAHMs who feel like they can barely cope day to day. Maybe they have depression. There are SAHMs who largely "swan about", just as there are WOHMs who are stressed, bored, depressed, resentful, as opposed to those with easy jobs or who use work to "escape" being at home. There are all types in all roles.
It's true that some women have the privilege of choice to be at home if this is what they actually want, but equally it's true that some women have better job prospects, better marriages and so on.