The text doesn't fully explain why Professor Herbert wants to cancel the debt. However, we may be able to deduce why he wants to do so from the context of the story.
First, let's look at the text where Professor Herbert talks about canceling the debt.
"I'm going to cancel the debt," says Professor Herbert. "I just wanted you to understand, Luster."
"I understand," says Pa, "and since I understand he must pay his debt fer th' tree, I'm goin' to hep 'im."
"Don't do that," says Professor Herbert. "It's all on me."
It looks like Professor Herbert wants to cancel the debt because he means to completely absorb the cost of Dave's debt. If you look back at the beginning of the story, you will read that Professor Herbert had chosen to pay forward Dave's dollar to Mr. Crabtree, the owner of the cherry tree. Therefore, the debt Dave currently owes is not to Mr. Crabtree, but to Professor Herbert.
In showing Luster Sexton (Dave's father) around the school and in explaining the high school science curriculum to the blustery farmer, Professor Herbert is educating Dave's father about changes in education. From the story, Luster appears to enjoy his time with Professor Herbert. The teacher's friendliness quickly disarms Luster, and soon, both are discussing the concept of germs in the study of biology.
So, Professor Herbert wants to cancel the debt because he has decided to absorb the cost of Dave's debt. But, why does he do this? Likely, he realizes that this goodwill gesture may ensure Luster's continuing support for the new changes in education the school has been implementing.