Isaiah 31:1. ” Woe to them that go down to Egypt for help; and stay on horses, and trust in chariots, because they are many; and in horsemen, because they are very strong; but they look not unto the Holy One of Israel, neither seek the Lord!”
There were always those who wanted to turn to Egypt any time there was a threat from another nation. They saw Egypt has strong and powerful because of their many chariots and horses, and their strong soldiers. The sin they committed was that they put their focus on human help, and refused to depend on God to help them out of their troubles.
No matter how often they were warned, or how often this cycle repeated itself, they continued to turn away from God and look to man for help. They would not listen; they would not see; they failed to remember how easily God had delivered them from Egypt so long ago.
Sin always has consequences. Always.