Are you surprised by the events recorded in Exodus 32? Whether we are surprised or not, I don’t believe God was surprised in the least. In fact, He just spent the last several "chapters" in Exodus laying out commands for the Israelites that had to do with idolatry, sacrifice, autonomy, and self-sufficiency.
So, when I say that God is a know-it-all, that doesn’t mean He goes around with a haughty attitude. I simply mean that He actually does know it all. By the events recorded in Exodus 32, we can see that God knew exactly where the hearts of the Israelites were headed. He knew they were prone to idolatry. He knew they would prefer gods they could "control." And before things got out of control at the base of the mountain, He had already laid out in detail the commandments and requirements that would help them steer clear of their tendencies.
God knows our hearts, and He is always engaged with us, on the offensive with us. He implements the measures He knows we need, helping us to move step-by-step from slavery into freedom. Just as He rescued the Israelites from their bondage in Egypt (and then began the difficult task of removing Egypt from within them), so He knows just how to rescue us from whatever is keeping us bound.
When it comes to His creatures, God is definitely a know-it-all. Our job is simply to relax, rest, and trust in His wisdom.