This was fully accepted in pagan Rome and around the world. Christianity changed it.
Christians would pick up the discarded Roman babies and raise them as Christians