Yes, but 6 shot cap and ball revolvers were around long before the S&W K frames were a gleam in anyone's eyes.
What is magic about 6 shot revolvers?
Yes, and those guns were already bigger than the eventual K frame original .38 cal guns and the equivalent competition from Colt. Carry around a big 1873 Peacemaker on your hip for long and you'll begin to like the idea of a slightly lighter and more compact K frame.
If you look into it there were also a number of small pocket revolvers that held .36 cap&ball that were "just" 5 shot models so that they would be more pocket'able. And at various times folks in Europe did make revolvers with more than 6 shots. But when you look at them they were all cumbersome if they used large size ammo.
When Colt downsized from the big Walker to the 1851 it didn't reduce in size and weight by that much. But it was enough to allow the gun to be carried on a hip instead of a saddle holster. From there each new gun was aimed at trying to maintain the 6 rounds while downsizing. But that was back in the day when .44-40 .44S&W and .45Colt were the rounds that everyone wanted to shoot in their full size frontier guns. The city slickers went with smaller guns that held 6 or 5 smaller rounds rather than wanting one of the big guns with more than 6.
So all in all it just sort of happened that way. Oh sure, back then COlt or S&W COULD have stuffed 7 rounds of 32-20 into the same size of gun. But I suspect that there wasn't enough of a market for such nonsense. If there had been I'm sure we would have seen more evidence of it.
And for those who just needed that extra shot? Well, there was always the LeMat ! ! !
It comes down to the Papa's, Mama's and Baby Bear's porridge scenario. 6 rounds gave a gun which wasn't too big and heavy to carry. You try packing around an N frame original .357 Registered Magnum or later model 28 Highway Patrolman on your hip all day and then tell us if you still think that a 7 or 8 round .357 is a good idea.