Microsoft designed Nearby sharing with privacy at its core. You can share files with people around you anonymously since you don't have to share contact information.