I have heard otherwise with regard to hot water tanks from 2 long time plumbers.
Rheem makes a special run for HD and some of the parts are of lesser quality vs. the models sold at at independent supply houses.
I've heard the same regarding Delta faucets
With the same model numbers??
There are certain parts in each of those items that can be made cheaply e.g. Plastic vs ceramic. Easy enough to check each item.
I'm sure it's true for some, maybe many items, but sweeping generalizations are not reliable, and anything you're hearing from a supply house has obvious negios.
Lastly, home depot has changed their game behind the scenes in a big way over the last few years, and what was true a couple of years ago is not necessarily true now.