The e-commerce giant is changing the structure of its stores business, impacting hundreds of employees.