I actually think this is a great question, :D
Well, let's put it in perspective. You know how in our world people tend to drop money, food, etc.? People in the Pokemon world are people too, and they tend to drop stuff! :D
As for the naturally generated items (Berries / Pearls / Heart Scales) I imagine the Berries are grown, picked up by some absentminded Bird Pokemon, hidden somewhere, and then the Bird Pokemon forgets about it. And as for Pearls and Heart Scales, I think they just wash up like shells.
Hope I helped!