what happened to the small arms after a battle
The answers to that are as varied as the armies and battlefields. An efficient fighting force that wins a fight of any size would gather up or destroy all weapons and ammunition in the field. This denied any resupply and re-armament to enemy forces acting as guerrillas, and if needed, the captured weapons and ammo could be used. In WW1, soldiers became very good at turning captured weapons on their former owners. Germany used 10,000+ captured British Lewis LMGs.On the Eastern Front, the Germans, Austro-Hungarians and Russians used thousands of captured rifles to replace older single-shot and black powder rifles in their arsenals.The Germans tried to supply the Irish rebels of 1916 with 20,000 captured Russian rifles and 10 machine guns.
In WW2 veteran troops made a habit of picking up extra automatic weapons in the field and adding them to their unit's arsenals, especially in the mechanized units who didn't have to carry them on their backs. A standard way to destroy unwanted weapons was to run them over with tanks.I've often wondered what happened to all the Axis weapons captured at the end of the North Africa campaign. Ideally they could have been dropped to the resistance forces in Europe or China.
The Germans used their trademark efficiency in collecting and redeploying captured weaponry. When they had enough ammunition for them, they issued captured weapons in non-8mm Mauser caliber to their own troops or Collaborationist and Axis allied troops like the Vichy French and Romanians who were short of equipment.An entire Army Corps of Russian defectors fought for the Axis after being re-armed with the Soviet weapons they had surrendered with.Many Allied troops landing in France on D-Day were killed by French Machine Guns in German hands. The Germans even produced a series of manuals and official numeral designations for captured weaponry including American ones.
The need to destroy weapons instead of leaving them in working order can be illustrated by the aftermath of the Battle of France in 1940. British left thousands of rifles, machine guns and heavier weapons in working order on the beaches of Dunkirk after the evacuation. These weapons were then offered as a gift to the neutral Irish Free State to entice the Irish into a full alliance with the Axis(they ultimately refused).
If not collected by a regular military or lost to deterioration, small arms can be collected by scavengers who may or may not be part of the local resistance movement. Some criminal types made a risky profit(or tried to)by gathering weapons from recent battlefields and selling them to the resistance with varying success. Polish criminals charged Jewish Ghetto rebels exorbitant prices for pistols prior to the 1943 Uprising. Allied money sent to the Polish Home Army and other resistance groups was used to buy weapons from corruptible Axis personnel who were guarding stockpiles of captured non-Axis weapons which weren't watched as well as German weapons.
In the greatest example of why abandoned weapon and ammo stockpiles must be secured or destroyed, the recently concluded(hopefully)occupation of Iraq began with US troops leaving mountains of explosive ordnance(like artillery rounds)untouched and unsecured because some fool politician believed that a new Iraqi pro-US government and military would magically appear and take possession. Thus, our troops were told to leave this theoretical government's ammo alone and keep chasing Saddam. Of course, this ammo became the main ingredient of the IEDs that have killed and maimed so many for almost 10 years.
MANY years ago, in one of the gun magazines, I read an article by a former US soldier who had been part of a group [Ordnance?] who was responsible for disposing of German [primarily] weapons after WWII. It must have been in the winter of 1945-46 because he spoke of warming their barracks with the walnut stocks of the rifles. Taking a leaf from the Bible, many of the barreled actions were forged into shovels, *****, and other agricultural tools. He talked of the 'excitement' of unloading a boxcar of weapons, many still loaded, after jostling for miles, when attempting to remove one could easily cause another, buried out of sight and pointing in any direction to fire.
In addition, I listened to stories of a friend's father who had been in combat in Europe. I have always been fascinated with firearms. I come by it honestly; I actually cut my teeth on a rifle stock, a Remington Mdl 510 .22 cal single shot which I still have. Rather than asking him for war stories I constantly wanted to know anything about guns. Unlike many, he had not brought back any weapons. He said he had a pair of chromed Lugers, which may or may not be true, but said all of the weapons his unit had collected were confiscated and dumped into one of the deep, cold lakes from which they couldn't be recovered.
I also read that Interarmco, a firearms importer in the late '50s, was supposedly approached by representatives of the Bundeswehr, the army being created by the West German government, with the idea of buying light machineguns. The owner of the company, whose name I have forgotten, supposedly took them to a warehouse containing 50 000 MG-42s.
In Iraq many captured weapons, especially small arms, were destroyed by tank, an efficient way of disposing of stamped weapons. Many more were used by our own soldiers, especially Armored, who were issued limited numbers [2 per tank, I believe] of the relative fragile M-16s. The AKs, which would take any abuse, were added to the tank weaponry. They were also used to arm the Iraqi police, though many new ones were also purchased for them, and were the usual weapons for the non-military groups working in country, who were permitted to use them defensively.
I know this is all anecdotal and I have no references, and in one case may be a true 'war story', but these are three examples of the fate of military weapons of the losing side. I hope it has been useful to you.