What's the go with discount codes?

I just had a buyer who just purchased one of our PC's but hadn't paid yet to add in a $50 discount code. I haven't had this before. Can anyone fill me in what this is all about?