The lemon juice balances out the sweetness of the apples and the sugar with a bit of tartness. The acidity of the citrus also helps preserve and lock in the color of the apples.