Complex sentence: When a dough or batter is baked, it "sets" and the holes left by the gas bubbles remain, giving breads, cakes, and other baked goods their soft, sponge-like textures.
Split into simpler sentences: When a dough or batter is baked, it "sets" and the holes left by the gas bubbles remain. This is what gives breads, cakes, and other baked goods their soft, sponge-like textures.