That hasn’t been the norm for over 100 years, maybe even longer.
It used to be mothers were granted custody since then as they were thought to be best suited to the role.
But joint custody is now extremely common in the US, where this ruling took place. Nothing wrong with the father giving formula to the baby; the mother can keep breastfeeding if she chooses and keep up a pumping schedule (she doesn’t need the milk to feed baby, just to keep herself producing).
I highly suspect she just didn’t want a solution at all.