As kids, friendship often felt like an accident of proximity: You bonded with the girl you sat next to in math class, the neighbor down the street, and the soccer teammates you saw on Wednesday ...