Okay what about when you kill everyone in an area and it is no longer they're area (trying to avoid spoilers)? If they have been forced out of that area by you then it stands to reason that what they left behind is yours.
The items didn't belong to those people, they belong to faction X-Y or Z.
Just like if I walked in work one day and everyone was dead, and I stole some company items, they belong to the company the people just use them. Still stealing.
The reason you can take things off the body's is because that is the personal belongs of that person, and if they are dead its fair game.
Just like lets say you wipe a camp of NCR out. The NCR still OWNS that camp, regardless of anyone being there. Just because the people are gone, does not mean the NCR stop existing.
So when you walk in the armory and the nice shiny anti-material rifle is there, it sill belongs to the NCR, not any one person.
IF and only IF that rifle had been GIVEN to a NPC would it be fair game.