Berlin has about 100 places for food sharing: Shelves or public fridges where people can put their food before going on vacation or when they have too much, so that other people can use it.
Does Tokyo have the same kind of thing?
I have lived in Japan for a long time . . . I seriously doubt it is a practice to any extent, however. Japanese don't really buy perishable food in bulk and I think they would find sharing food about as alien as leaving their front door open and inviting people to stay in their home while they are on vacation. Also they are crazy about food sanitation - conbinis throw away tons of packaged bentos every day - I believe they are prohibited from giving them away by food hygiene laws. So leaving my milk and eggs for someone to eat could break the law. I know that must all sound weird to a European, but it's true.