While property laws vary from state to state, the general rule of thumb is that if a person in a location where they have permission to be takes personal property that has been lost, mislaid or abandoned by another person, the “finder” owns the property over all others except the original owner. (Some states also give a priority claim to the land owner where found, and if a person is on the job, it is their employer that has the right.) The finder has no duty to discover the owner, but if they know or find out they must allow the original owner to recover it. Hence the criminal statute cited above knowledge of the original owner as a required element.
Also, when applying this general rule, “abandoned” does not mean merely left behind with an intent to return for it - it means purposely relinquishing any claim of ownership. If someone had left with the intent to return (and remembered where it was) then the person who takes it commits a theft. But if the owner is unknown then their intent is an open fact to be determined in light of the circumstances - a fact that would be decided by a jury if it came to that.
So, if the circumstances reasonably suggest abandonment, lost or mislaid then you can take it, but if you are wrong about those facts then you may have committed theft. And, even if lost or mislaid, if you find out the original owner you have to give it back. This leaves many to choose a practical, zero risk, solution - give to a LEO and move along - no need to worry about original party’s intent or follow up.