Because baking soda reacts with the ingredients in cake resulting in trapped carbon dioxide, which give way to a rising batter due to heat. (honestly tres leches is my favorite type of cake)
The reaction of baking soda or baking powder with the liquid in the batter: These ingredients react together and cause air bubbles to form. ... Heat of the oven: The heat of the oven can cause baking powder to react further and cause more air bubbles, and the heat also sets the structure of the cake.