To answer this, let us first think about what inflation does to the value of money. Simply put, it reduces the value of money. Each dollar is worth a little less after inflation than it was before. This is, for example, one reason why my grandfather could be paid about $2,000 per year as a college professor right after World War II whereas a college professor today would expect something in the range of 20 times that amount. Therefore, inflation makes money lose its value over time.
So, how does this help a debtor? If you borrow money today and pay it back five years from now, the money you pay back will be worth less than the money you borrowed today. That means that you have actually benefitted on the deal. Let’s say there was 5% inflation annually. If that was the case, each dollar you pay back five years from now is worth less than $.75 was when you borrowed. You have gained value by borrowing. The more inflation there is, the better off the debtor is because more inflation leads to a greater loss in the value of money.