God has never done wrong and yes He has commanded for children and animals to be killed.
For the creature to question the creator is absurd. The Creator can do no wrong for He is the very standard of what is right. Unless you are granted to approach the subject from this vantage point you will never understand the mercy and kindness of God.