While they don't gain income, they offset expenses. Childcare and housework is an expense so significant that by electing to perform it at no cost, she saves the household around 100k a year, probably more. That's why it's understood as a job. Once kids can go to public school, it lowers the net benefit. That's why most households only have SAHMs until the kids reach school age. The reason why SAHMs are compensated in divorce proceedings is because the husband got the benefit of her labor.