In a K-frame chambered for 38 Special, the pencil barrel and heavy barrel both have their place. I've owned (and still own) both types. I think the pencil barrel was often a bit maligned and overlooked in favor of the heavy barrel. This is unfortunate because the pencil barrel is obviously lighter and shoots just as well. The heavy barrel gives the shooter a little more muzzle forward weight and a lot of shooters feel it "hangs" on target a bit easier. That may be true, but that's more a shooter thing than a gun thing.
Back in the revolver days of American law enforcement, the trend towards the end of the revolver era favored the heavy barrel. Some of that was marketing because the heavy barrel was perceived to more accurate (it may be easier to shoot well but it's not inherently more accurate).
I will say that I'm grateful that S&W produced both types.