it’s for entirely selfish reasons
Everyone has children for selfish reasons. Because they want children.
That's the only reason to have children.
As another poster has said - until contraception, having babies in your 40s was common.
and declining fitness at the same time as a young child needs you to be in full fettle and firing on all cylinders Have you heard of the obestiy epidemic? Lots of younger women are very unfit and having babies.
Lots of women through history have dealt with children whilst going through menopause. Lots of women now have children in their 40s and will do this.
Its not a matter of the ideal - I am sure your friend is aware her life is not ideal - its a matter of how much she wants this and the work it will entail.
As for the child, most people prefer living to non-existence. Lots of us never have perfect lives in perfect situations. Living in low income households is hard and presents challenges and limitations - should lower income people not have children?
Perhaps only women aged 28, (to ensure the child is least late teens before menopause hits, but the mother has lived enough to be mature enough to raise a child) who has bought a house, lives in a two parent household with family close enough to provide inter-generational support and earning at least 50% above average household income, and obviously living within catchment of decent schools, should have children? Otherwise the poor child may be disadvantaged?