Dressed in a tuxedo, Ryan Matzner walked by the piles of trash outside a big Nike store in the SoHo section of Manhattan. Then he stopped. It was Tuesday evening, pouring rain. One of the trash bags had caught his eye.

Were those shoes in it?

He tore a small hole to get a better look. Shoes were indeed in the trash bag, and from what he could see, there were plenty of them. A bag of shoes could be useful: At his girlfriend’s building in East Flatbush, Brooklyn, neighbors would leave unneeded garments in a hallway rather than throw them out, and they would be quickly snapped up.

Mr. Matzner, 32, was on his way to a black-tie birthday party. Showing up in his tuxedo with a trash bag full of sneakers did not seem like a good idea. “I left it alone and headed to the party,” Mr. Matzner said.

At the gathering, he met a friend, Lauren Wagner, and they agreed to share a cab home to Brooklyn. “First, Ryan wanted to make a detour to look at the bags again,” Ms. Wagner, 29, said.