When I owned the bike shop, my point of sale system was set up to record the serial number of each bike sold with the customer's contact info.
At least twice that I can remember, I was able to reunite rightful owners with their bicycles thanks to people who had found the bikes abandoned, and thanks to the decal affixed near the bottom bracket with my store name and phone number.