While Floyd Mayweather Jr. has made the shoulder roll technique iconic, it has in fact been around and has been used for quite a long while in boxing. Floyd employs this technique and pulls off some amazing defensive tactics which lead to effective counter punching.
The shoulder roll function is defending punches by allowing them to slip right past the shoulder. The roll takes place when a punch is thrown and the shoulder is moved in the direction of the punch. The force of the blow is deflected, and minimal force results as the shots glance right off, opening up the window for an effective counter punch to land.
Here you can see a bouncer execute the move as a drunk tries to set him up with a couple of jabs, then a big shot which the bouncer shoulder rolls and counters for a knockout.