The cells in the spongy layer of plant cells are packed loosely together because it allows for gas exchange. The air spaces between the spongy cells allow the cell to easily facilitate the exchange of carbon dioxide and oxygen between the outside and the inside of the cell.
According to SparkNotes, the spongy layer is the second layer of the mesophyll, which is the tissue between the epidermal cells into which gases diffuse from the stomata. The stomata, small openings on the underside of the leaf, open and close to allow carbon dioxide and oxygen into the cell. Because the spongy layer is loosely packed, the gases travel into the empty spaces surrounding the spongy cells. The open space allows the gases to move freely into and out of the cell as the stomata open and close. For instance, when the stomata open, carbon dioxide rushes in and oxygen rushes out. When the stomata close, neither gas is allowed into or out of the cell.
According to the BBC, the air spaces within the spongy layer allow carbon dioxide to diffuse into the leaf and increases its surface area. Additionally, the spongy layer contains chloroplasts, which house the stomata responsible for gas exchange. Essentially, when the plant cell contains enough moisture, the guard cells of the stomata fill with water and force it open. Then, gas exchange occurs. However, when the plant cells lose too much water, the guard cells deflate, which closes the stomata. This prevents further water loss and gas exchange.