For starters, the people failed to acknowledge God as their ultimate leader. They didn't submit themselves to Him. They didn't live life God's way. In fact, they got to the parent where they really didn't care what God's will for their lives - or their country - might be.
The Israelites also appointed human leaders who were not so godly and ignored God. Eventually they conformed to the ways of these ungodly leaders. (If the leaders ignored God, how would you think they might lead the people?)