Seriously, this is straight from Deuteronomy 28:53 which you can find marvelously illustrated with legos by The Brick Testament (whose renderings of a series of God’s curses are helpfully grouped together by Dwindling In Unbelief)
And thou shalt eat the fruit of thine own body, the flesh of thy sons and of thy daughters, which the LORD thy God hath given thee, in the siege, and in the straitness, wherewith thine enemies shall distress thee.
I guess God just “works in mysterious ways” or “is a just God who cannot let us just keep on sinning without any punishment” or “was communicating his timeless moral truths through the culture of the time” or “was relating to his people under a different covenant back then, within which punishment through cannibalism was just fine” or “works in mysterious ways” or “means metaphorically to say ‘love your children as blessed gifts’ where it literally says he will make you cannibalize them.” Or, you know, something baldly rationalized away like that so that we do not have to actually question whether this book is a moral guide at minimum or the divine truth at maximum.
Seriously, how can anyone with a working conscience and a 21st Century sense of reality call a book such as this divinely inspired? Only through the force of irrationalistic pressures such as tradition or total ignorance, that’s how.