The people set their hearts to obey what God had told them and what He required of them. God told Moses to take an offering without telling him what it was for because He wanted Israel to be motivated by a willing heart.
God is a rich God and can use any method of providing He wants. Yet He usually uses the willing hearts of His people as the way to support His work.