What is the cause of hygroscopy?
Ions are hygroscopic because they form very stable, low energy hydrates, which are thermodynamically favorable over water vapor. I.E. salt attracts water vapor because the hydrated salt is lower energy than the water vapor. Other very porous materials are hygrosopic due to capillary action. Water vapor is attracted to the surface initially due to a variety of reasons, then the narrow channels in the porous material cause the water to spread out to lower their energy.