They do.
Any settlers not assigned grab random stuff. If you want more stuff, assign them to a scavenger table.
There's a hardcoded, peculiar limit to this though.
Once your settlers have gathered 100+(5*# of settlers) they will stop collecting any more.
So, in a 20 person settlement that's 200 junk items. Unassigned gather 1 a day, scavengers get 2.
Thing is you have to remove those items from your workbench for them to collect more. But the game doesn't highlight them. So effectively you have to remove all junk out, in order to have scavengers collect more.
This means you then can't build/craft at your settlement without picking up the junk yourself.
I would be fine with this if there was a way to break junk down into its components without trying to craft something. This should have been a function in the conveyor belt builders.
Then I could take all junk, break it into its lighter constituent components and put those back into the workbench for use, and my settlers could continue scavenging.
As it stands the only effective scavenging situation is to build a perfect settlement, supply lined to others for food and fill it with 20 settlers and 20 scavenging stations, and remove all items from the workbench.
Then you make 40 junk a day. Come back every 5 days to empty the workbench before they hit the limit.