I think that they are great and should be used by everyone in the armed forces. I mean in a fire fight it always easier to switch to a pistol than reload if your position is really compromised. Furthermore what if your primary gun was hit with a bullet and rendered inoperable (or just jammed), a pistol would be great. Also if someone gets hit with a pistol round they will drop just as easily as by a standard nato round (not including body armour). Anyway the only real reason that I see why soldiers would not be issued a pistol is cost, which is a bad excuse imo. My Favourite pistol would have to be the H&K usb.
I do think pistols have there place in the armed forces. When issued appropriately, things are fine. However, I do not think it is appropriate for everyone to be issued a pistol.
As other posters have mentioned, pistols are really most effective in the ~15-25 ft/ 5m-7m range. As a rule, unless one has no choice, one does not want to become engaged at that close a range, also, with the distribution of other weapons (carbines, SMG, etc) there are other, potentially better weapons for CQB. This would mean essentially that a pistol would really be a 'backup' weapon issued to those who do not normally need a weapon (high ranking NCO & CO's) or to those in situations where they might develop a problem with their primary weapon or have their primary be inappropriate at a critical time and need some form of backup weaponry.
As for reasons why everyone is not provided with a backup weapon, there are a number which come to mind. There are of course cost issues, both is establishing sufficient stockpiles of pistols as well as ammunition. Then there is the amount of training time, costs, etc to actually train everyone to be able to use a pistol properly.
Then there is relevance to the mission. By this I mean, is a pistol even needed? Aboard ship in the USN, except for special circumstances (and/or areas/personnel) any small arms are kept in arms lockers. IIRC from what I have been told, using a
688/
Los Angeles-class SSN, there were (are?) some pistols as well as a few M-14's carried. And then on a regular basis, there is a yearly (I think, memory fuzzy) qualification shoot at a range. For the M-14 it was explained to me that the requirement more or less consisted of managing to shoot it down range without accidentally shooting yourself or someone else with it.
Lastly, for Army or USMC purposes... The question needs to be asked, which is better. An extra 30-60 (or more) 5.56mm ammo in magazines, or a sidearm and perhaps 30 rounds for it? There is a finite limit to how much weight it is reasonable for someone to cart around, even if they are normally motorized or mechanized. Between the normal kit one carries while on patrol (rations, water, armour, packs, ammo & primary weapon) it all adds together quickly. At some point, a trade off has to be made as to what will be carried or otherwise brought along.
-Cheers