But society, luckily, isn't some autonomous macro-organism that can treat people like individual cells in your body. So when we say that we value babies above all else that's a projection of the individual aspirations of the members of that society.
An average member of society will care much more about the health of their family and children than maximizing the GDP of their country, and government policy and rhetoric luckily at least partially reflects this.