When you tell your companion to loot a corpse, what do they look for on the body? I think they take things that I'd find useless, so I do the looting myself, but it would be nice to have them loot everything instead. And do different companions look for different things?
They take one thing at a time until there are no items left. Now, which items they pick I'm not completely sure on because I've not exactly broken down the game code, but based on my observations they usually just take the "first" item in the list that you can see when you hover over a lootable container/body.
I see it a lot when I tell them to loot the body then look at the body before they pick the item, and the item at the top gets picked. Armor/clothes tend to be at the bottom of the list, so if you tell them to loot a body until the body is naked you probably got it all.
I have never seen them take more than one item at once, and I have them take a LOT of items in EVERY dungeon. (As in literally everything in every location I visit, lol.) This only applies to single types though like... if there are 25 shotgun shells, that is still "one" item/line, and all 25 will be picked. Then again according to one of the links shared by DC above maybe my followers only pick 1 item at a time because they are almost always way past their weight limit!
Note: You can use this to have them carry an infinite amount of items, so just have them take everything anyway. Free materials or caps. I routinely have my followers cart 5000+ water from Sanctuary to Diamond City/Good Neighbor, just because I can.