as the egg heats up, the air inside the bubble expands. as the hot air pushes outwards, it puts pressure onto the shell, making it crack.