RE: 22 or 24 inch barrel?
All barrel lengths chosen are a compromise. Most, if not all, ammo manufacturers chose 24" as the standard test barrel length (for standard rifle cartridges), because that length is a good compromise between velocity and reproducibility (that is, their numbers wouldn't be terribly realistic, if they had chosen 30" for test barrels....because rather few people carry 30"- barreled rifles in the field). The 24" length is fairly common...and will produce a bit better velocity numbers than 22", or 20", etc. The standard test barrel length for magnum cartridges is 26"....for the same reasons.
The decision had nothing to do with accuracy. All other things being held equal, accuracy tends to be better in a SHORTER barrel, not longer.