Many consumers’ shopping habits are changing as they choose private-label goods over their preferred brands.