Clearly, it isn't illegal to do this kind of thing in general. What's illegal is doing it when you have enough market power to be deemed a monopoly. No physical retailer is anywhere near that. Businesses are allowed to be anticompetitive. That's more or less the entire reason they exist. They're not allowed to create monopolies by being anticompetitive.