We discount both for the same reasons. We are calculating the equivalent amounts ‘now’ of the inflows and outflows.
If you are at all unsure of the logic of discounting then do watch my free Paper MA lectures on interest and on investment appraisal, because the discount is revision from Paper MA (was Paper F2).