system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: What happens to the weapons and gear of fallen soldiers?

From my inferences in modern conflict you can't just leave AK's in a foreign country because civilians can acquire them. Please explain to to me what happens to all this excess military equipment.
gpt
Hey, US Army Infantryman who is actually in Afghanistan right now here. 

In an Infantry platoon it is the Platoon Sergeant's job to maintain accountability of all men, weapons, and equipment. He does this by maintaining a MAL (master authorization list) given to him by the Company's Armorer when weapons are signed out from the arms room.

When a Soldier is injured or killed during combat operations he/she is put onto a MEDEVAC (medical evacuation) vehicle, whether it be a helicopter or some form of ground transportation. Prior to the Soldier being loaded all of his equipment is stripped off of him/her and retained by the unit. If the Soldier carried a crucial casualty producing weapon, like a machine gun with a higher rate of fire than the standard M4, it will be given to the next most qualified person along with all the ammo. This is to try and maintain the combat effectiveness, AKA how many bullets you can throw at people, despite having less people.

As for the gear, after it is recovered back to a FOB (Forward Operating Base) all gear that was worn by a casualty is inspected by people certified to determine whether it is serviceable. If an item is not serviceable and the casualty is still alive the inspectors will make an effort to send the item to the casualty's home. It is not uncommon for Soldiers who received gunshots to their helmets to get to keep those for life. 

Enemy equipment is another story. In a perfect scenario where we eliminate the threat and have time to investigate any enemy equipment is gathered by a TSE team (Tactical Site Exploitation) on the spot and processed similar to a crime scene. Bagged, tagged, photographed, and turned into Military Intelligence for processing so they can determine ways to fight better against the enemy's weapons and equipment. 

In other situations enemy equipment is destroyed on the spot to permanently prevent the enemy from using that against us. 

TL;DR Platoon Sergeant is responsible for recovering friendly equipment to the best of his abilities and repaired as quickly as possible. Enemy equipment is analyzed by Military intelligence or destroyed on the spot.