the reason why an egg floats is because as it decomposes, water vapor and gases are released through the porous shell. this is what causes the yolk and whites to shrink which in turn makes the air cell larger.