Retirement tax questions

It doesn't come out of your pay pretax.  But when you file your tax return it can be a deduction before the AGI which makes it pretax.  See 1040 schedule 1 line 19 which goes to 1040 line 10a.

https://www.irs.gov/pub/irs-pdf/f1040s1.pdf