This isn't true - once it is put out for disposal, you lose rights to what's inside. That's why so many private eyes and investigations go through people's trash - they willingly gave up ownership of what's inside by putting it in a trash can or dumpster:
Note that when a person discards trash, they have no "reasonable expectation of privacy" in the discarded items, which means that the police can search through the trash without first obtaining a warrant.
However if the dumpster or garbage bin is still in an enclosed area or is on private property, a person could be cited for trespass or even for theft if they try to rummage through the garbage.
This isn't true - once it is put out for disposal, you lose rights to what's inside. That's why so many private eyes and investigations go through people's trash - they willingly gave up ownership of what's inside by putting it in a trash can or dumpster:
https://www.findlaw.com/injury/torts-and-personal-injuries/dumpster-diving.html
https://www.legalmatch.com/law-library/article/is-dumpster-diving-illegal.html
My son is a PI - he’s and expert at analyzing trash.