Let's get back to the real reason - straight line action of the bolt. It's a designer's compromise because the of receiver, and any associated buffer tube, spring, or other bolt arresting mechanism that is in the rear. Putting them in the stock changes the balance and makes them less muzzle heavy, allowing quicker targeting.
AFAIK, the M16 is the only assault rifle that puts the recoil spring in the stock. The AK's recoil spring is in the receiver above the bolt, and the stock is structural only.
So, with a long straight line action that forces a straight line stock design, the pistol grip goes underneath.
I suspect that the straight-line concept was indeed the primary reason early on, yes. It is not the only reason pistol grips are preferred, though, hence the prevalence of pistol grips on unlimited-class bolt-action target rifles and precision rifles.
Ever see a drill team using M16's? No, conventional grip stocks are a lot more ergonomic, you don't have to move your hand dropping to the ground on a three second rush.
Straight stocks may be more ergonomic for drill team use and for dropping to the ground, just as they are more ergonomic for holding the rifle horizontally at waist level. Pistol grips are indeed more ergonomic when the gun is mounted on the shoulder in firing position (less wrist flexion), which accounts for the prevalence of vertical grips on target guns.
Pistol grip assault rifles also force the barrel lower in stance, requiring taller sights, and compromising close combat shooting by the offset.
It's not the handgrip style that puts the barrel down low, it's the choice to put the barrel under the gas tube in order to put the barrel axis more in line with the stock. You can put a pistol gripped stock on a gun with the barrel mounted high, too (the Beretta BM-59 comes to mind).
Pistol grip stocks aren't the end all be all, just a compromise in design. Note the rifle of choice for snipers is still a conventional stocked bolt action. There are some sniper stocks with pistol grips, I don't really see the point other than marching in the fashion parade.
The pistol grip style is chosen when circumstances permit because it offers better hand position for precision shooting. Even sniper/precision rifles
without separate handgrips often attempt to duplicate the grip angle of a pistol grip stock, either with thumbhole or extreme Monte Carlo variants, to offer the same ergonomic advantages.
And of course, the U.S. Army is replacing the M24 sniper weapons system with the pistol-gripped M110 semiauto precision rifle, although M24's will continue to serve for quite a while.