The lemon juice not only adds a tart and bright flavor to the jam but also helps to preserve the color of the peaches.