Looking further into it, there's more nuance to it. Of the several people who popularized the phrase in the early 1900s, one of them was Harry Gordon Selfridge. While he is lumped in with the others, the phrase he used was actually "The customer is always right, in matters of taste." With the idea being that a salesperson shouldn't judge the wants of the customer. If they want an ugly sweater, sell them an ugly sweater, don't try to convince them to get a good looking sweater.
Others said slightly different things. Like Cesar Ritz who said "The customer is never wrong", where the idea is that the moment the customer complains, you take action to solve the problem the customer has stated, even if they are incorrect.
https://en.wikipedia.org/wiki/The_customer_is_not_a_moron