Where did the materials for the Mishkan come from?

Parshat Truma, Shmot 25:1-7, describes the building materials that were requested of B’nai Yisrael for the construction of the Mishkan (Tabernacle):

God spoke to Moshe saying: "Speak to B'nei Yisrael and have them take for Me a terumah (donation) offering. You shall accept gifts for Me from every person whose heart so moves him. And these are the gifts that you shall accept from them: gold, silver and copper, techelet, argaman (purple), tolaat (crimson), fine linen and goats hair, red-dyed ram's skins, tachish skins and acacia wood, oil for the lamp, spices for anointing oil and for the incense of aromatic spices, onyx stones and filling stones for the ephod and breastplate.

In Parshat Vayakhel, Shmot 35:22 we read about the golden objects that were brought by B’nai Yisrael:

The men with the women, all whose hearts moved them, all who would make an elevation offering of gold to God, came bringing brooches, earrings, rings, and pendants—gold objects of all kinds.

The next two verses in Vayakhel (Shmot 35:23-24) describe where some of the other materials came from:

And everyone who had in his possession blue, purple, and crimson yarns, fine linen, goats’ hair, tanned ram skins, and dolphin skins, brought them; everyone who would make gifts of silver or copper brought them as gifts for God; and everyone who had in his possession acacia wood for any work of the service brought that.

In Shmot 35:27-28, we see that some of the more expensive objects were brought by the leaders:

 And the Nesi’im (leaders of the tribes) brought lapis lazuli and other stones for setting, for the ephod and for the breastplate; and spices and oil for lighting, for the anointing oil, and for the aromatic incense.

How did B’nai Yisrael have access to all of these materials in the middle of the wilderness?

In Sefer Shmot, it is repeated three times that the plan was for B’nai Yisrael to take goods from Egypt at the time of the exodus as we see in Shmot 12:35-36:

B’nai Yisrael carried out the word of Moshe; they requested from the Egyptians objects of silver and gold, and clothing. God gave the people favor in the eyes of the Egyptians and they let them have their request; so they emptied Egypt.

This makes sense for the small objects aside from the acacia wood which is known to have grown in the region.

May we learn from B’nai Yisrael to use our precious possessions to support holy causes and bring spirituality into the world.