Diamondiiz,
The Ninevites were warned, is it possible that God knew they would repent and turn around if warned? Yes, thus the warning. Sodom was not warned, is it possible God knew they would not stop their violent ways even with a warning? Yes. Even today there are groups of people who are so entrenched in their violence and hatred that no offer of peace will be accepted. And then there are others who, though in opposition, do want peace and are willing to seek that peace.
"If it's human wars as I see it, I can anderstand it why women and children were killed and why no one was spared but if they were god's wars it doesn't make sense."
In the time of the OT this was the way it was. Whether the accounts are literal or allegorical matters little, either way we learn something about God. God will do what he deems is necessary and what in the long run is best for all concerned including those who have died whether justly or seemingly unjustly. We are not God. We do not have the power to right all wrongs or to resurrect.
If God exists we all have the hope of something better if he does not then this life is all we have. Which is more unjust? That God exists and those who suffer death have the hope of a better life in the future or that God does not exist and this life only we have? In the bottom line of all things which is firmly planted in injustice; God allowing temporary death or no god exists and all who have suffered in extreme poverty and depravation will never have a chance to live a better life, ever! I believe the latter situation is the more unjust for to live our one and only life in misery just because we happen to be born in a poor country or are of another race while others live in comfort with all the food they want is extremely unjust. It is so unjust that every man or woman who believes there is no God should not rest until all humanity has an opportunity to live that one life as a good life. But that will never happen, it is not possible. There is only One who can guarantee that each man and woman and child has a hope for a better life and though we may not understand Him, or think His ways wrong, it is a hard truth that it is only through God that all peoples and individuals can have a hope for a better life, a life worth living.
If there is no God then the millions and millions all around the world living in abject poverty are merely the eternally miserable and hungry dead waiting to pass into oblivion. This is the height of injustice and the legacy that evolution, if true, has doomed all mankind to.