Curse of Joshua

After defeating Jericho, Joshua cursed stating whoever rebuilds the city will lay its foundation with his firstborn, and with his youngest he shall set up its gates. (Joshua 6:26) The ruined city would have been a memorial of a judgment of God on sin, idol worship, and rebellion against God. There was a new city built on an adjacent site. However, five hundred and thirty years later (850 BC), during the reign of King Ahab, Hiel from the city of Bethel rebuilt the ruined and cursed Jericho. His firstborn son Abiram died when the foundation was laid, he lost his youngest son Segub when set up the gates. (I Kings 16:34)
Ignorance: Hiel was from Bethel. Did his parents teach him the Law? Children were taught the Law by the community, probably he did not attend or listen when taught or ignored this important lesson. A lack of knowledge of God is dangerous. (Hosea 4:1, 6; 6:6) Ignorance of truth or law or history, is no excuse.
Truthfulness: The Word of God, the testimonies are true. (Psalms 19: 7) Heaven and earth will pass away, but not the Words of God. (Mathew 24:35) God is not a man to lie. (Numbers 23:19) Jericho was meant for destruction as a judgment of God. Reviving the city is a rebellion against God.
Worldly influence: Hiel lived during the reign of Ahab the most wicked king in Israel. (I Kings 16:29-34) Ahab did evil and society accepted evil as the new normal. Being from Bethel, Hiel was influenced by the idol worship set by Jeroboam there. (I Kings 12:28-33) Friendship with evil and wicked people leads to foolish, immoral, and unholy actions.
Unbelief: Did Hiel reflect or consider why Abiram his firstborn died? Did anyone counsel him to abandon his rebellious building project? He persisted in his project to gain a name in this world.
Sorcery: Other bible scholars state that he sacrificed his first son as he laid the foundation and sacrificed his youngest son when he erected the gates.
Do I fight against God’s judgment?