During the days of Shamgar and Jael the Canaanites were so strong that the people with the birthright to the land feared to go out on the main highways. Instead they travelled the back roads to avoid molestation. Peasant farmers could not raise or sell crops because of their Canaanite threat. They stopped working because of the Canaanite oppression. The Israelites chose new gods in the sense that they turned to idols as a result of God not delivering them for 20 years. These conditions led to war in the gates of the cities, that is, internal strife in Israel. The 40,000, or less likely 40 military units, were evidently Israel's soldiers who did not have normal weapons.
When God raised up Deborah, Israel's fortunes changed dramatically. Deborah saw herself as merely a mother in Israel, not a great warrior or even a prophetess, though she filled both of those roles. A mother is an unlikely leader of a successful revolutionary war.