After the exodus from Egypt, the people of Israel gave freewill offerings to build the tabernacle (Exodus 25:2–7). After the exodus from Babylon, the people of Israel gave freewill offerings to rebuild the temple (Ezra 2:68).
When God rescued the people of Israel from Egypt, he did it so that they could worship him (Exodus 3:12). When God brought his people up from Babylon, he also did it so that they could worship him.
68 Some of the heads of families, when they came to the house of the LORD that is in Jerusalem, made freewill offerings for the house of God, to erect it on its site.