It happens all around us. The term from the literature is market segmentation. Exceedingly bright people make a lot of money identifying, analyzing, and adapting to the boundaries of market segments. Airline prices tend to be more expensive during the week because business travelers occupy more seats, want to get home sooner, and are less price-sensitive due to employers footing the bill. In the U.S., your choice of Publix, Kroger, Walmart, or Aldi for grocery shopping demonstrates your most comfortable segment. After passing through the doors of your favorite grocer, further opportunities for market segmentation are in your choice between name brands or store brands, which both may have originated from the same supplier.
Grocery store margins tend to be thin. Where they really want you going is to the pharmacy, and surprisingly, what they want you to buy is generic drugs — more market segmentation. The name brand drugs tend to be really expensive. The generics are much cheaper in direct comparison, and for the store, the margin on generics is higher because name-brand prices create headroom. Yes, these broad generalizations have lots of exceptions, e.g., some generics are not perfect substitutes for name brand drugs, but the general pattern is there.