I think that's just a manually-set field. It certainly predates the accounting improvements, and I think it predates price sets.
The problem is that it's not always a reasonable assumption that the bulk of a contribution is deductible. You might have a organization with a 501(c)3 arm and a 501(c)4 arm. The dinner is $500 per couple, toward the c3, with $100 non-deductible because it's the value of the dinner itself. Then, they ask for a $250 contribution to the c4 on the form as well. The result is that really only $400 of the $750 is deductible, but the
non_deductible_amount is $100.
Really, this needs to be at the line-item level or dropped entirely.
I tend to avoid the field and encourage folks to just say in the receipt text that they received $100 worth of goods/services in return for the gift. The donor can do the math, and it's not too important for the organization to track that at the contribution level.