In my experience as retailer it comes from what Klabbauter mentioned: they're always right in their complaints, because we have a job to not only sell products, but satisfaction as well.
However: The whole "Customer vs Company" view is a wrong one.
Just like in relationships whenever there's a problem, it's not him vs her. (Or him vs him, or her vs her).
It is the Customer AND Company vs The Problem.
It is Husband AND Wife (or Husband/Husband, Wife/Wife, and any other form of relationships included besides marriage) vs The Problem.
So the Customer is always right should still be aimed at Companies, so that they will work together with the Customer to tackle The Problem. And in that view I say: it is correct.
That is why service employees are trained to understand the Customer. Saying that you understand does not have to mean they are right, but the underlying issue is that they are right.
There's a whole grey area though, when it comes to warranty or disclaimers which reinstated the whole Company vs Customer idea again. And that is not a good development, unfortunately.
For example: A Customer returns a defective hammer drill, because the Customer used it to drill a hole in a solid concrete wall, unfortunately the hammer drill was not powerful enough so it overloaded and burnt out.
Customer is unhappy, riling himself up on the way over, storms in, slams the product on the counter with the receipt: "This thing is a piece of trash!!"
Nowadays the Company vs Customer view kicks in at most places (The Customer was too dumb to buy a better drill) as they take that comment at face value.
"The Customer is always right" view teaches you to find the underlying issue: That hammer drill did not live up to the expectation of the Customer. And in that respect: he is right. He's all bothered because the drill did not survive putting a hole in a solid concrete wall.
Now the service part of the Company's job kicks in.
Finding out how the Customer got that wrong expectation. Was he advised by an employee? Did he do his own research about the drill? Or was he (unintentionally) misguiding the employee with wrong information about the walls (Stone/bricks vs concrete) or were assumptions made.
While it does not solve the problem immediately, and it might cost the Company some money, it is imperative to figure this one out, as you might be dealing with an employee that will cost you more on the long run, so even though you're technically correct: Misuse of the device voids any warranty, you could just shell out some cash and give the Customer 50% off his next CORRECT purchase.
This way the Customer returns again because even though he later realises he's partly to blame, you still gave him a discount. And you get information on the problem and can correct it before more damage is done. Ranging from a small training for your employees to always get most of the details about what The Customer needs that product for so they can give the best advice, or firing an employee for just not giving a crap about that and only think about his/her sales numbers.
A Company with the wrong attitude will only focus on the warranty guidelines and disclaimers to make sure they're not to blame. Basically telling the Customer they're stupid for buying the wrong hammer drill.
You'll never see that customer again, and if you keep that up your business WILL cease.
Even though you're technically right, and they are wrong.