The discount compensates the early investor for taking risk before a price was set. A 20% discount means the investor's note converts at 80% of the next round's price per share, they get more shares for the same dollars than the priced-round investors do.
Discount and cap usually work together: the investor gets the better of the two at conversion. A high cap with no discount is generous; a low cap with a steep discount is investor-friendly.