Retirement tax questions

So if pretax dollars are  listed in box 12 i.e. with letter D - 401k contributions - then why on that W2 is box 1 listed with this amount in 12 - with letter D subtracted but box 3 and 5 have that amount added back in.  Is that because 401K contributions are taxed for SS and state?