Where the sportswear giant went wrong and how other brands can avoid making the same missteps.