It isn't absolutely necessary, but adding lemon juice to the apple pie will add a bit of acidity to the pie and help prevent the apples from browning.