I'm surprised that made it out of the factory. These things do happen though.
Did you happen to notice it when you bought it? I've purchased firearms and in my excitement didn't notice something until I got it home. It happens.
It is a rather cheap and simple fix, but I would probably have had the dealer send it back or get you another one. I have friends that swear by the M&P's and do not think this is indicative of the rifles coming out of the factory. Somebody just dropped the ball.
I do think that a call and maybe emailing a photo to S&W is in order. Any company needs to know about things like this.
For future reference, I always wrap some electrical tape around the receiver extension nut a couple of wraps when removing it or putting it on.
Hey, on the bright side, at least you didn't lose the buffer retainer pin!