The diaphragm (assuming no leaks) moves closer to the fluid, and the air that gets in is actually separated from the brake fluid by the diaphragm. It's between the lid itself and the diaphragm.
On the old Chev taxis, it was quite noticeable over the life of a set of pads. With new pads, the master cylinder would be full, and you'd make sure the diaphragm was seated correctly and not all crumpled or anything. As the pads wore and the brake fluid went down, the diaphragm would be distended "down" towards the brake fluid. Replace the pads and straighten out the diaphragm and the process starts all over.