A crisis at Bed Bath & Beyond that led activist investors to unseat top officials was decades in the making, as a frugal culture that served the retailer well in the past became a hindrance in the e-commerce age.