OP, the answers you seek will not please someone such as yourself. You have to remember, we're talking about the idea of a universe where a divine being exists that can literally speak things into existence, and has; not the least of which being the entire world we now live in. Or so it is written. That's not realistic to most people, quite understandably, I might add, and so most people will never find the answers they seek despite them being rather obvious and right in front of them.
I'll start with a few base concepts. Your flesh (in and of itself) is already dead; it's literally decaying as you read this (
as is everything else in this world), except for, to religious people, the "divine essence" or "soul" or what have you that keeps it intact. Meaning, when the real you (not your flesh or body, but the deeper conscious being that is eternal) leaves your body, the body immediately and rapidly starts to decay as does every thing without a soul in this world. According to the body of literature in question, it's not impossible to raise the dead. That means, for a divine being, death or "killing someone" as we mortal beings would imagine it, is little more than how a parent would send a child to their room for misbehaving. It's literally that impermanent. Just as easily undone as it was originally done. If not even easier. Basically, the hallmark of this and many if not most religion is "Death is a lie." It's not rational, in a scientific sense, so if you don't accept that, that's the reason you find yourself unsatisfied with the answers being provided. Which again is perfectly understandable.
As far as I was made aware, the Amalekite people were known sorcerers. If you want to believe magic is not real, yet stick with the underlying narrative, call it some sort of alien technology, if that pleases you. In the world described in the Bible, sorcery is real. You can alter your flesh to appear as an older person, a younger person, an animal, even an inanimate object. Easiest thing in the world; provided you know how. But for mortal beings, this requires either a temple or obelisk or some sort of magic-related practice or place. So, prevailing theory in my circle is, obviously during an invasion if you are unable to repel the enemy, you hide. These people, according to the world the Bible describes, "hide" a bit differently than how you or I would I.E. altering their flesh to "become" non-hostile objects, be they children, animals, or even empty barrels and crates. But they can only do that in close proximity to the object or obelisk from which they draw their power from. Hence the order to "Destroy everything living and non-living" I.E. raze the place to the ground. Again, this is not what one would call "rational." But if you're asking questions about a school of thought or world that is inherently "not rational" by modern understanding, this should be expected and par for the course.
Call it all hogwash if you will, but, again, the above scenarios seem to be the only "logical" (heh) answers and explanations that
line up perfectly with the world described in the text you reference in the OP.
As for the rest, I have no idea. Other than not that long ago there was one option to survive: war. And as to war there were only two options further when it was all said and done: to kill an entire population so that they would never rise up and rebel against you for what you did to them, or enslave them, for the same reasons. As to which is more or less cruel, that's not something I have much to say about.
Of course, even if everything is true, including my justifications, it still leaves one nagging question unanswered: Why? Why all of this? Well, that's just something I believe we'll find out one day. Or, maybe we won't! Could you even imagine a more interesting existence? I think not,