I expect this strongly depends on the dairy product in question. For cheese made at the farm, sure. But for plain milk sold in a supermarket, I expect the improvement in logistics far more than makes up for the cost in pasteurization. People don’t UHT-pasteurize their milk for fun — UHT milk is easier to transport and can be shipped and stored in larger lots and rarely spoils on the shelves.
Where I live, you can buy raw milk but only at a substantial premium.