The primary function of spongy mesophyll is to facilitate gas exchange. The large air spaces between the cells allow carbon dioxide to diffuse in and oxygen to diffuse out, which is essential for photosynthesis. Additionally, the spongy mesophyll helps in the movement of water and nutrients throughout the leaf.