If the longer barrel is more accurate, it's only because the increased sight radius makes it possible to aim more precisely.
With a scope, the short barrel may actually be more accurate.
Look up pictures of modern bench rest shooting, you don't see super long barrels on those rifles.