How come the Old Testament (Bible) taught the killing of infants (babies)?
Simple:The “Right” thing to do under Judgment (“Eye for an eye, tooth for a tooth” [Exodus 21:24] and “...for what they have done will be done to them.” [Isaiah 3:11])
Commonly quoted verses by the opponents of the Faith but greatly “misinterpreted as to why”:
“Thus saith the LORD of hosts, I remember that which Amalek did to Israel, how he laid wait for him in the way, when he came up from Egypt. Now go and smite Amalek, and utterly destroy all that they have, and spare them not; but slay both man and woman, infant and suckling, ox and sheep, camel and ass. And Saul gathered the people together, and numbered them in Telaim, two hundred thousand footmen, and ten thousand men of Judah.” (1 Samuel 15:2-4)
“O daughter of Babylon, O destroyed one, O the happiness of him who repayeth to thee thy deed, That thou hast done to us. O the happiness of him who doth seize, And hath dashed thy sucklings on the rock!” (Psalm 137:8-9)
The misinterpretation: How come God condoned or instructed the killing of babies?
The Truth: Judgment is such because “the parents” of these “infants/babies” also “did first such acts” toward “others”.
For (1 Samuel 15:2-4), note the phrase “which Amalek did to Israel” and in (Psalm 137:8-9), note the phrase “repayeth to thee thy deed, That thou hast done to us” which “means that these wicked people did that FIRST toward Israel”, hence God allowed them to do “likewise” (equal, right, perfect Judgment with the same acts back —> Agreeing with the principles in [Exodus 21:24] & [Isaiah 3:11] quoted prior).
God didn’t instruct the killing “FIRST” but allowed it as an “equal” punishment for what “they did FIRST”.
In the New Testament however, Christ the Lord taught more than the “right” thing to do; more accurately, the “perfect” thing to do which is “to forgive” and “lay down our lives instead” as He Himself demonstrated on His Most Awesome Cross:
“You have heard that it was said, ‘Eye for eye, and tooth for tooth.’ But I tell you, do not resist an evil person. If anyone slaps you on the right cheek, turn to them the other cheek also.” – Lord Jesus Christ (Matthew 5:38 – 39)
That is, God in Christ taught believers to move ‘higher’ from being “right” (Judgment) to being “perfect” (Love).
There are “no” contradictions in the Bible if you read “correctly”.
Only the spiritually-blind see contradictions.