1. There's limited space at the front of a brick and mortar store. It's not practical to put most of the items at the front, so anyone who's not just there for a bag of chips ends up looking through the aisles anyways.
2. Brick-and-mortar stores usually only sell a few forms of same product. If I want olive oil, there's some store brand, some italian-looking brand, and maybe a brand that advertises some sort of magical health benefits. There might be a few variations for the level of refinement/virginity. It's easy for me to look at all the options and compare them. When I look at a search page on Amazon, there's often 100's of hits, and it's often pretty unclear if there's any difference between them that I'd care about (see https://www.amazon.com/s?k=olive+oil).