Pretty much what Gunner's Mate said.
The pin locked the barrel into place, and was inserted in the top of the frame and just ahead of the cylinder cut, which locked the barrel extension into place.
This mechanical lock meant that the barrel didn't have to be torqued into place quite so tightly.
Some Smiths made after the pin was dropped were too tightly torqued, leading to barrel problems.
The recessed chambers was originally done as a safety measure, but really wasn't necessary, and over time became something of a trademark for S&W. The first centerfire guns with recessed chambers was the .357 Magnum, introduced in 1935.
All rimfires still have recessed chambers, which is more of a safety issue as the rim can blow out on a .22.
Then again, what do I know about all of this. I'm simply horribly, horribly, biased against Smith & Wesson, to the tune of having purchased 13 of them now.