It’s a clear biological necessity. Without it the species would have died out. Too many parents would have abandoned their children in infancy or toddlerhood.
It would be interesting to determine if this phenomenon increases with the increases length of childhood over the millenia. I bet you’d find a strong correlation, but how could one determine such a thing?