The Supreme Court years ago ruled that dumpster diving is legal with some stipulations. If the dumpster is locked or behind a gate then no diving unless you have permission. If the building space is leased then what's in the parking lot is technically fair game unless the owner of said building says no.