We used to call this capitalism based on consumer free choice and it was just how things worked.
It still is, "capitalism based on consumer free choice" as you noted.
I was raised in a small town in Missouri, population about 1,600. Back in the 50s we had 6 small grocery stores in our town. Then just 7 miles away in a somewhat larger town, a Kroger and A&P opened for business. Over the course of just a few years all the stores in our town were closed, they could not compete. I think of that every time I see someone complain about W-M running mom and pop stores out of business. This has been happening long before W-M came on the scene.
I support the local hard ware store where I live for minor purchases but when I need something costly, I have found that Menard's or Lowe's is always less expensive for the same product.
Our local hardware is pretty good, and we have a Tractor Supply, as well. But you are right: HD and Menard’s have better prices and selection. Although, I have to give WM credit: our pool vacuum head attachment finally bit the dust after 22 years of service and in such a manner as to not be repairable. We thought we would have to go to the pricey pool store 45 minutes away for a replacement and WM had one for under $30. Convenient.
For some items, we like Northern Tool Supply, especially when they offer free shipping.
Back in the day, our little town had 3 hardware stores and 6 shoe stores!!!! Service and prices were lousy. Salaries for any help was miserly. All the shoe stores are gone and we have the one True Value hardware left.