From what I understand, the original Colt Commando XM177E2 had a ten inch barrel, then lengthened to 11.5 inch. Even then this length was found to produce too much blast and not gas balance very well, so they added the 4.5 inch flash hider/moderator. I am guessing they did this because the spec probably called for the shorter barrel, and just using a 16 inch barrel would have made too much sense, military procurement being what it is. More of an issue of the mil being not too smart rather than Colt. Other variations typically had a 16 inch barrel, or a properly configured gas tube setup for the short barrels.
I think Choate made a slipover 4.5 flashhider, it went over a 16 inch barrel, but most of it extended back over the barrel rather than forward, making it look like a Commando, but still having the 16 inch rifling. I always meant to set one up like this to have the cool XM177E2 look.
When they did the M4, I am guessing the 14.25 in barrel is the correct length to be able to use the bayonet with carbine length handguards, but I have not got around to testing theory this out.