Using consumer data to improve the quality of your products and for future advancements is not only ethical, but a great idea. It allows a company to more accurately stock a store based on its location. It allows companies to improve minor quirks in their products. It allows companies to market to the right people.
Consumers exist in the marketplace to purchase a product or service from a particular company. They do not go to have their shopping habits, preferences, etc used for alternative purposes. Collecting data unbeknown to the consumer and using it for ulterior motives is unethical and violates the trust between a consumer and a company.