to understand this passage, you will need to know the history.. yes God is a loving God..
1Sam 15  Thus saith the LORD of hosts, I remember that which Amalek did to Israel, how he laid wait for him in the way, when he came up from Egypt. (this is why God killed everything of the amelekites..through Saul)
lets see where it is referred to..
Ex 17: Then came Amalek, and fought with Israel in Rephidim.
 And Moses said unto Joshua, Choose us out men, and go out, fight with Amalek: to morrow I will stand on the top of the hill with the rod of God in mine hand.
 So Joshua did as Moses had said to him, and fought with Amalek: and Moses, Aaron, and Hur went up to the top of the hill.
 And it came to pass, when Moses held up his hand, that Israel prevailed: and when he let down his hand, Amalek prevailed.
 But Moses’ hands were heavy; and they took a stone, and put it under him, and he sat thereon; and Aaron and Hur stayed up his hands, the one on the one side, and the other on the other side; and his hands were steady until the going down of the sun.
 And Joshua discomfited Amalek and his people with the edge of the sword.
 And the LORD said unto Moses, Write this for a memorial in a book, and rehearse it in the ears of Joshua: for I will utterly put out the remembrance of Amalek from under heaven.
 And Moses built an altar, and called the name of it Jehovah-nissi:
 For he said, Because the LORD hath sworn that the LORD will have war with Amalek from generation to generation.
God fought against the amelekites because they came against the children of isreal.. and likewise, I would want to have God fight against my enemies if they come against me. He loves His children.