To answer the OP: YANBU. And your friend sounds rather rude.
Clearly, the wide range of financial and personal circumstances in which people find themselves make it difficult to make accurate or meaningful generalisations about whether one ought or ought not to work/stay at home. I say "ought" because - as is always the case - these threads go straight to the heart of the matter, namely that - whatever people might say - this is a moral or, perhaps rather, ethical matter.
I think, because of this, people on each "side" often respond in a manner which makes me think of (philosophical) ressentiment.
"Judging" seems almost impossible, as if, in the Sartrean sense, when we make a choice, we make it for all mankind (hence each of our choices reflects on - and judges - each one of us).
Anyway, it is clearly not a subject easily to be dismissed as the many threads on MN demonstrate.
IMO and IME (and I stress the personal nature of these reflections), I have returned to work for reasons which are a complex mixture of selfishness and thoughtfulness. I believe that my DD would prefer me to be with her full-time, and hence to choose my career over her (for 3 days a week) is selfish, undoubtedly - at this stage at least. It is selfish too in that, in my field of work, it is virtually impossible for someone to drop out for 5 years and return. I would have to re-train and I don't want to do that. I love my job and worked hard to get it, beating over 250 candidates for it. Hence my decision to keep it is - primarily - selfish. We could manage on one salary, though with our current financial commitments, that would be difficult (again, a "selfish" decision not to downgrade our housing, etc.).
Yet, in the long term, it is not entirely selfish. I will be better off, and better able to provide luxuries for my DD. True, she may look back and say that she would've preferred me to be there all the time for her; but equally, she may resent or be unhappy - as a teenager and student at university - that I am unable to provide additional things for her. It's a tough one to judge. I am trying to strike the right balance. In the very long term, I am also providing myself with a good pension, so that I will not be a financial burden on DD when I am elderly, should care become an issue.
I am lucky in that I can squeeze my working hours into 3 full days of work (away from DD), and then do the rest in the evenings while she sleeps. This is a luxury in some respects, though not necessarily in terms of my energies! As time goes on, I hope to be able to juggle my day so that I pick her up from school half the time, and DH the rest.
Anyway, I am rambling. I suppose the point I am making is that I am "happy" to admit that being a WOHM is, for me, a multi-faceted decision which is, in part, selfish. I hope that I am able to parent DD well enough that, in the long term, those days away will not make a difference to her happiness.