The first 357 Magnums were 8 3/4 inch barrels. They were built on the N frame and evolved into the model 27 in 1957 when they put a model number on them. Later S&W made the 8 3/8ths inch barrel the standard for their longest barrel on their revolvers.
The reason for the longer barrel was to obtain the highest velocity from the 357 Magnum cartridge.
Believe it or not, a lot of shooters liked and prefered the longer barrels for hunting, and long distance shooting. The longer barrel gives the best performance from the cartridge.
Industry standards use a 10 inch barrel to record velocities from a hand gun round, unless published otherwise.
About 50 feet per second is lost per inch of barrel length that is reduced from that standard figure.
.