Yes, but in the first line you also said we never understand the details. If there is insufficient information to understand in the source material to provide context that justifies Joshua roaming the streets of Gezer as it burned, moving from house to house, cradle to cradle, taking even the infants and impaling them on his sword as they cried and wailed, confused and terrified and never having committed a wrong against God or Israel in their brief lives, why should we assume these infants had it coming?
No context is provided that makes it okay, no context I can think of could make it okay.
I hear you, but I don't think you're understanding me. My first human reaction is like your's "why would he do something like that".
The difference between me and you, is that I didn't write it off as cruel and unjust behavior. I honestly looked up some information because the God I've read about, as you yourself stated, is a God of love -- New Testament.
Joshua obviously trusted in God based on previous experience and did what he was commanded. God protected Isreal from the days of Moses tll his day. I'm not saying Joshua never asked God why, but based on what he heard or read of regarding the flood, sodom, and others experiences, he trusted God enough to do as commanded.
As a child, you never really understand why your parents ask you to do what they do, or why they set certain rules. However, since they love you and care for you, you know they have your best interest at heart. I am sure servants of God felt and feel the same way.
Questioning God's motives on everything you read in the Bible won't help you to understand it, particualry if you have already well-established opinion about His morality or the lack thereof.