In Exodus 19, everybody hears God telling about the covenant and they all agree. In Exodus 32 we read that when Moses is on the mountain (chapter 21-31) they let Aaron make a golden idol as in Egypt. How can they do that?
I don't know if you could have picked a better illustration passage for how men think. It is amazing how a nation could make a solemn vow to abide by a covenant and then toss it neatly away in a matter of days. Overall, the short answer is the concept of deception.
The Bible has a lot to say about deception. Jesus said in Mark 13:5, "Watch out that no one deceives you" and Mark 13:22, "For false Christs and false prophets will appear and perform signs and miracles to deceive the elect — if that were possible." Paul says in Romans 16:18, "For such people are not serving our Lord Christ, but their own appetites. By smooth talk and flattery they deceive the minds of naive people" and in Ephesians 5:6, "Let no one deceive you with empty words," and Colossians 2:4, "I tell you this so that no one may deceive you by fine-sounding arguments." Then James adds in James 1:22 "Do not merely listen to the word, and so deceive yourselves. Do what it says." And all of that is just a tiny portion of what the Bible says about deception.
A quick summary of the methods of deception are false signs and wonders, smooth talk, flattery, wisdom of the world, empty words, fine sounding arguments, and just listening and not putting into practice. Being deceived can come from both within a person and from outside. Outsiders can try to convince us that something that is false is true. However, we also can deceive ourselves if we turn a blind eye to the facts (maybe intentionally, maybe carelessly) because of what we want to be true.
Exodus 32:2 said that the people asked Aaron to make gods to go before them because they did not know what happened to Moses. Notice that they were not told all the details, and they felt uncomfortable not knowing everything. That is what started them on the path of rationalizing. They took it upon themselves to fill in the gap in their knowledge by guessing what would be pleasing to God. They used human reasoning to figure out what the next best steps would be.
What is important is not who was at fault for the deception, but why did the people fall for it. What should they have done? What was the right course of action? Well, we know that they were told not to make idols of gold (Exodus 20:23) and they were told to wait. They had all the instruction that they needed. Sometimes, though, men find ways to convince themselves that they are not really breaking the rules (part of the self-deception). Maybe they convinced themselves it wasn't really idolatry or that God was actually powerless to protect Moses and something may have happened to him. Whatever they did, worked and we find them doing something obviously wrong.
We can easily have the same problem when it comes to currently worshipping God. It is easy to convince ourselves to believe in something that is not true, especially if we are not careful. People want the Bible to explain the answer to every question that they can think up – and when it doesn't, they believe that they are free to make something up to fill the void. Maybe at first it is just a detail in a story, but later it gets to adding commands that are not there. We will justify it on the basis that we want to be righteous, but this topic in the Bible can't possibly mean what it obviously says and is inhibiting me from freely being righteous. Therefore, we start looking for ways to get around the Word or even to just ignore the Word. Ultimately our arguments start to sound logical even when it is clear that our conclusion is the exact opposite of what is written. When they do – we have managed to deceive ourselves.