Why is an excess IRA contribution decreasing the taxable portion of IRA distributions?

I've run into a situation in which intentionally leaving an excess IRA contribution of $3800 unremoved (and therefore being penalized $228) reduces the total tax (1040-SR line 16) by over $840. Needless to say, I'm skeptical that everything is being calculated correctly, so I'm comparing the 1040-SRs that result from the two cases—removing vs. not removing—to see what changes.

 

When TT is told the excess contribution has been removed, the taxable portion of IRA distributions (under income) decreases by the same amount. The taxable portion of social security benefits also decreases a little, but I suspect that's just a knock-on effect. Total taxable income decreases accordingly. I can't think of a reason this would make sense. Can anyone else?

 

According to TT, the taxpayer would've owed even less tax if they'd maxed out the generally allowable contribution amount for their age, for an even larger excess contribution. Am I overlooking something?

 

Note:

  • The semi-retired taxpayer is above the minimum age for unpenalized IRA withdrawals.
  • The same 1040 results whether the $3800 is entered as having been removed or as never having been contributed in the first place, as you'd expect.
  • Nothing else is changing, input-wise. I can switch the IRA contribution back and forth and watch the outputs change as described.
  • The return passes TT's federal review like this (i.e. with an effective deduction for excess IRA contribution).