As my SEP contribution goes up, my taxes are also going up. What gives?

I am using Turbotax Home and Business 2020. I am actually working on taxes for a friend. He is a sole proprietor and is contributing to his SEP. His sole income is from his sole-proprietorship. When using the maximize button, Turbotax calculates that the max he can contribute to his SEP is $14,971. When he contributes the max, his taxes only go down $317. That seemed like a very small amount considering the $14,971 is supposed to be tax deductible. So I did some testing with other amounts. The column on the left represents the SEP contribution. The column on the right are the taxes he owed. Notice that his taxes come down about $98 for each $1,000 he contributes to his SEP. But that only happens up to a $5,000 contribution. When he contributes $6,000, his taxes jump UP by just under $1,000 ($969). Why are his taxes owed going up even when he is increasing what are supposed to be tax-deductible contributions? The final contribution we tested is the $14,971 because that is the maximum tax-deductible contribution he is allowed to make according to Turbotax. Can anyone explain why this is happening? He actually makes out better by contributing only $5k than he does by contributing the max. $14,971.Thanks

 

SEP CONTRIBUTION      TAXES OWED

$0                                        $15,717

$1,000                                $15,619

$2,000                                $15,522

$3,000                                $15,424

$4,000                                $15,327

$5,000                                $15,229

$6,000                                $16,198   (jumped UP almost $1,000)  WHY?

$7,000                                $16,113

$8,000                                $16,022

$9,000                                $15,930

$10,000                              $15,845

$11,000                              $15,753

$12,000                              $15,668

$13,000                              $15,577

$14,000                              $15,491

$14,971  (maximized)      $15,400

 

So what's happening here?