system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: What is the purpose of the air bubble inside chicken eggs?

It's fun to poke, and that's all I know.
gpt
Eggs shrink as they develop.  Even if they're not fertile they still shrink as water slowly evaporates.

Bird eggs have both a leathery shell (mostly collagen) and a hard shell (mineralized with chalk).  The leathery shell membrane peels back from the chalky outer shell, and that's what makes the bubble.  Technically it's called the air cell.

By the time a chick is ready to hatch, it's absorbing oxygen through an umbilicus (like mammal babies) that attaches to blood vessels on the inside of the shell.  For it to hatch it has to switch to using its lungs, and stop that umbilical blood flow.  

So it breaks the air cell (which has gotten large by this point) and breathes that air (also through the outer shell).  Once it has the strength to hatch, the chick breaks the outer shell too.