Lemon juice helps enhance the blueberries' flavor and balance the sugar's sweetness. It also assists in helping to thicken the filling, creating a more cohesive texture.