The result in the Hamilton, Larkhall and Stonehouse by-election came as a surprise to many pundits.