If a woman cannot care for a child and is so mentally troubled/disabled she cannot make a legal decision, a court can decide it is best for her to be sterilised to prevent the problems to the woman of an accidental pregnancy.

Men cannot get pregnant.

It is not about eugenics, nor forced sterilisation of an otherwise able mother. It's about caring for best intrest of the woman and the future babies, or no future babies.

Explaining the reason, not morally commenting on it.