Nowadays, officers like captains and lieutenants use the same standard issue weapons as their men do. But back in the old days, officers were popularly depicted waving pistols about. Later on in WWII they would be equipped with carbines or submachine guns. Why was this the case?
My work buddy who dabbles in military history says that officers were just given lighter weapons for self-defense, focusing more on commanding and directing their, who did much of the actual fighting.
Your friend is 100% correct, officers (and even many NCOs) weren't, and still aren't, supposed to personally do much shooting. Their job is to coordinate the fire of their men and manage the tactical situation - if they're spending too much time shooting, they can't do that and the effectiveness of the 20 to 200 riflemen with them plummets.
If officers do get weapons they were (and still are) meant mostly for personal defense.
Why give officers pistols? Officers start getting issued pistols (usually revolvers) in the mid- to late-19th century.Pistols were better weapons than, say, carbines, for officers. A 5- to 6-shot revolver could be aimed and fired much more rapidly than most rifles of the era. Also, up into the late 1800s, most officers carried swords. With a pistol in hus left hand and a sword in his right, an officer could slash and shoot. Battalion, and regimental commanders, along with other senior officers were often mounted on horseback, and a pistol is a perfect one-handed weapon for a rider who may need to defend himself.
During the 2nd Boer War and WWI, this changed somewhat. Officers waving pistols (the swords were gone now) made prime targets for snipers. More and more officers took to wearing the same uniforms as their men and carrying rifles, as much as props as actual weapons. However, pistols remained standard issue weapons for infantry officers - as before, officers weren't expected to do much shooting unless in self-defence.
Most armies at the start of WWII only issue pistols to their infantry officers. As time goes on, more effective pistol replacments appear. Armies eventually realise that young platoon commanders need a more effective self-defense weapon against enemy soldiers with Schmeissers and machine guns. A revolver or M1911 just wasn't enough anymore.
The U.S. Army adopted the M1 Carbine very explicitly as a pistol replacement to be carried by soldiers who used to carry pistols. It was meant to be easier to use, more accurate, and longer-ranged. In 1941, a U.S. Army platoon leader has an M1911 .45 pistol. By 1943-1944, he has M1 Carbine. The British make a similar call by issuing the Sten submachine gun in 1943-1944 to the subalaterns commanding infantry platoons.
As before, some officers in WWII elected to carry the same weapons as their men - sometimes to give themselves more firepower (this was Dick Winters' reasoning for carrying an M1 rifle instead of an M1A1 carbine) or to better blend in with their men as a counter-sniper precaution.
Only with the rise of lighter assault rifles was it deemed prudent and possible to give infantry officers and men the same weapons.