For four decades, these sandy-beach getaways filled with basketball have become a beloved mainstay of the sport itself.