The babies of the Cannanites did not deserve death.
G-d disagreed, apparently.
A caveat to my last post, certain Eqyptian children definately did not deserve death, but were killed anyway, as that was a necessary step in obtaining freedom.
(Hence a fast before Passover, in honor of the children who died for their parent’s actions.)