Why does baking soda rise when it is added to some foods?

Baking powder and baking soda both leave carbon dioxide gas when combined with moisture. This is what causes the expansion of baked goods. The key difference between baking soda and baking powder is that baking soda is just sodium bicarbonate, while baking powder contains sodium bicarbonate, an acid (for instance monocalcium phosphate), and usually cornstarch. The acid in the baking powder reacts with the sodium bicarbonate to produce carbon dioxide, thus removing the need to add acid separately to the recipe.