Beyond sweetness, sugar acts as a tenderizer and preservative. By absorbing water, it prevents the flour from developing tough gluten strands, ensuring the crumb remains soft. It actively attracts and locks in moisture from the air, which extends the cake's shelf life. Sugar also helps cakes rise by trapping air and moisture, making them lighter and softer. It also gives cakes a golden-brown color as it is caramelized during baking.