The baking soda (a base) reacts with the acids in the candy and foams up. When it's poured out and starts to harden, the bubbles are trapped before they can escape (another reason the baking soda is added at the end). This lightens the texture of the candy, making it just a bit "crumblier" than it would be otherwise, i.e., easier to break off and easier to chew.