Changing the mortgage PRINCIPAL balance (not the interest paid) changes the tax owed - WHY??

I have a $830K mortgage on a home purchased in 2011.  So it's grandfathered above the $750K limit which began in late 2017. I'm married filing separately which means I can ONLY itemize deductions.

 

Weird things happen when I change the "principal balance" (line 2/box2) of the mortgage data entry.  If I enter the $830K from the start of the year (per the 1098) and change nothing else, I get FED taxes owed of about $19.7K.  If I lower the principal amount to around $500K the FED taxes drop to $16,055. And they stay that way if I take it down to $1.  If I drop the principal literally to 0, the fed taxes change to a whopping $25.7K.

 

This seems kinda screwy.  Why does the principal balance affect Fed (and state) taxes owed, if the entered mortgage interest itself has not even changed??