Milk is one of the things people often buy because they need it, so why not put it right by the entrance? Because supermarkets don't only design stores around what people need. They design them around how people move.
If you have to walk past other products to reach the milk, you are exposed to hundreds of other choices, You might notice something you weren't planning to buy, you might remember something you forgot, you might simply spend more time inside the store.
The milk isn't necessarily at the back because supermarkets want to make your life difficult, the layout is designed to influence the journey between the door and the checkout.
A simple grocery trip can actually be a carefully designed path.