We use the cost of capital to account for the interest on the money raised.
I think you might really mean why do we use the Weighted average cost of capital to discount.
It is because (at F9) we assume that the level of gearing remains constant and that the level of business risk remains constant. If they do then the WACC will stay constant and therefore the cost of the extra money raised for the investment will be equal to the WACC.
It is impossible to explain further here – it is a whole lecture.
You should watch my free lectures on Chapter 17 (the cost of capital) and Chapter 18 (when (and when not) to use the WACC for investment appraisal) from our Course Notes.