The passages that you refer to are part of the prevailing literary genre of the era defined by a common, shared vocabulary, imagery, motifs and tropes stretching across neighbouring cultures: a genre of the establishing of the dominion of the national deity following victory over the forces of chaos represented by an enemy also found in the celebratory monuments erected by the kings of the ancient Near East.
Typically, there is victory over the waters of primordial chaos, which is why the Old Testament also discusses a sea monster called Leviathan and shows Yahweh having his victory over the Egyptians in the Red Sea. The Song of Moses in the Book of Exodus, for instance, depicts Pharoah as the agent of chaos whose chariots are devastated in the sea by the Divine Warrior Yahweh. The harsh rule of Pharoah is replaced by the kingship of Yahweh, who redeems his people.
This was how these ancient peoples expressed their understanding of divinity, using the violent characteristics and vivid, military language inherent to their civilizations. To properly understand these texts, you need to have some exposure to Canaanite mythological literature, particularly the epic literary cycle of the primordial victory of the Divine Warrior over foes and his construction of a house of worship.
For our purposes, the best comparative texts to consider would be the
Enuma Elish (Babylonian creation myth) from Mesopotamia, the
Baal text from Ugarit, the
Amarna letters from Egypt etc.
In the
Enuma Elish (which in its latest copy dates to the 7th century BCE but probably has roots in circa. 1100 BCE) the god Marduk—the national deity of the Babylonian Empire —defeats the primordial mother goddess Tiamat, and uses her dismembered body to form the cosmos:
Face to face they came, Tiamat and Marduk, sage of the gods.
They engaged in combat, they closed for battle.
The Lord spread his net and made it encircle her…
He shot an arrow which pierced her belly,
Split her down the middle and slit her heart,
Vanquished her and extinguished her life…. (p. 253)
The Lord trampled the lower part of Tiamat,
With his unsparing mace he smashed her skull… (p. 254)
At this part in the epic, Marduk establishes a place for himself to dwell and rule:
I shall make a house to be a luxurious dwelling for myself,
And shall found his cult center within it,
And I shall establish my private quarters and confirm my kingship….
I hereby name it Babylon (bāb-ili, “gate of gods”), home of the great gods.
We shall make it the center of religion. (p. 259)
The comparisons with the biblical verses you have in mind should be apparent: Yahweh defeats Pharoah at the parting of the Red Sea, drowning his chariots, and leads his chosen people to a promised land where Solomon eventually constructs a temple for him to dwell in, a cultic centre in Jerusalem.
That same basic narrative using the sane basic language of warrior gods defeating enemies and then having houses constructing for them to be worshipped in is repeated again, and again and again in the surrounding cultures of the ancient Near East, as with the Urgaritic
Epic of Baal (composed circa. 1300 BCE):
Baal seizes the sons of Athirat (=Asherah, the wife of El, Baal’s mother)
The mighty he strikes with a mace,
The attackers he strikes with a weapon,
The young of Yamm (=god of the sea) he drags to the earth.
Then Baal [is enthroned] on his royal throne,
[On the resting place], the throne of his dominion.
As you can see, its a completely human and well-established literary tradition that the sacred authors have relied upon to formulate their partial, incomplete and imperfect understanding of God. Yet none of the Babylonian, Ugaritic or Egyptian parallel narratives, when it comes to the construction of the Temple devoted to the worship of the victorious warrior deity, have a message like this to impart to the readers:
1 Chronicles 22:
David said to Solomon: “My son, I had it in my heart to build a house for the Name of the Lord my God. But this word of the Lord came to me: ‘You have shed much blood and have fought many wars. You are not to build a house for my Name, because you have shed much blood on the earth in my sight. But you will have a son who will be a man of peace and rest, and I will give him rest from all his enemies on every side. His name will be Solomon, and I will grant Israel peace and quietduring his reign. He is the one who will build a house for my Name."
Now, that was
not the normal ending to the story: to subvert the very violence inherent in the imagery of a victorious battle God and teach that even a just war pollutes the soldier such that he cannot build a house of worship, which must be constructed by someone who is innocent of human bloodshed and is a man of peace. You don't find that in the
Enuma Elish or
Epic of Baal.
There is something else budding here, a new way of looking at the world, that was most exquisitely expressed by the prophet Micah in the late 8th century BCE, in which Yahweh's temple becomes the symbol of universal peace and conciliation between nation's, who "beat their swords into plough-shares" and abandon war (again a concept alien to the contemporary Near East):
Micah 4: 1-8
In days to come
the mountain of the Lord’s house
shall be established as the highest of the mountains,
and shall be raised up above the hills.
Peoples shall stream to it,
and many nations shall come and say:
‘Come, let us go up to the mountain of the Lord,
to the house of the God of Jacob;
that he may teach us his ways
and that we may walk in his paths.’
For out of Zion shall go forth instruction,
and the word of the Lord from Jerusalem.
He shall judge between many peoples,
and shall arbitrate between strong nations far away;
they shall beat their swords into ploughshares,
and their spears into pruning-hooks;
nation shall not lift up sword against nation,
neither shall they learn war any more;
but they shall all sit under their own vines and under their own fig trees,
and no one shall make them afraid;
for the mouth of the Lord of hosts has spoken.
For all the peoples walk,
each in the name of its god,
but we will walk in the name of the Lord our God
for ever and ever.
Jesus would go on to perfect and complete these non-violent aspirations through his ministry. That's progressive revelation mediated through divine condescension to human ways and weaknesses.
Within the literary framework of the time, therefore, God has imparted genuine divine revelation but by condescending to the language, imagery and perceptions of these primitive Near Eastern people - whereas with Jesus, you have God actually speaking directly in the flesh according to Christian doctrine (although still via the literary genre of a gospel that must also be interpreted in its appropriate first century context). Big difference there.
Your problem IMHO is that you read these texts at face value without conceptualizing them within the literary genre and time period they were written to conform with.