I think people who view it as a luxury just don't realise the costs of childcare - either because they don't have dcs or they have access to free childcare from family.
I live in a commuter town outside London. The costs of 2 dcs in full time childcare plus railcard would have been a £50 a month loss, when dc1 started school it would only have been a £80 profit a month. This is on a salary of £38k - so way above average, DH earns too much to get any help with childcare costs, and we pool finances so the ridiculous argument that "remember your DH should pay half" doesn't apply.
It was a choice because we could afford to make a loss for 6 months then with a tiny profit, I could have worked or not, but it make little difference, so it was just down to personal choice, I chose to SAH.
Interestingly, it's given that I am "lucky" and I don't work, have loads of time to do all the housework and family admin. If I hired a nanny to do just the childcare element of what I do all day, I would be looking at paying around £30k, it would be seen as a profession and unreasonable to ask the nanny to clean or cook for the family or sort out any household tasks not child related.
Being a sahm is a job, it's just not a paid one.