Here's a table from Guyton and Hall Textbook of Medical Physiology showing the partial pressures of gases in different types of air:
We can see that as the partial pressures of some gases decrease or increase, the partial pressures of the other gases increase or decrease, respectively. Let's focus on nitrogen. The PN2 in humidified air is lower than in atmospheric air because the PH2O in humidified air is higher (I'm not sure if the word "because" is correct here, but I guess it is). The PN2 in alveolar air is higher than in humidified air because the PO2 in alveolar air is lower.
Since partial pressure is proportional to concentration, I believe a gas should go somewhere for its partial pressure to decrease or come from somewhere for its partial pressure to increase.
Where do nitrogen molecules go or come from in the two cases I described? As the PN2 in humidified air decreases, where do the nitrogen molecules that cause this decrease go? As the PN2 in alveolar air increases, where do the additional nitrogen molecules that cause this increase come from?
I'm asking only about nitrogen because I think the reasons should be similar for the other gases (i.e., the PO2 in humidified air and atmospheric air) or are clear (i.e., diffusion into and from the blood for O2 and CO2).