Price discrimination doesn't work under perfect competition (see: law of one price).
Insofar as it might work for Home Depot, it may be due to local monopoly (competitor is not co-located) and asymmetric information (customers assume a bigger quality difference than is true). However in my experience, the price of premium tools/supplies often does reflect higher production cost these days.