Lemon juice in cake batter adds acidity, enhancing flavor and contrasting sweetness. It reacts with baking soda to help the cake rise and can tenderize gluten for a softer texture. However, the right amount is crucial to avoid affecting the cake's structure and taste.