Well you can also do both, give in to the customer but let the employee know why you did so they don't feel like they made a mistake.
Absolutely. Do it all the time. If we aren't talking about anything business shattering but what amounts to a blip on the radar, it is best to go with the idea that a fight with the customer is counterproductive. In that case, the manager or employer makes the effort to quickly take the employee out of the equation. I will frequently tell the customer "you're right. We should have had that covered" or whatever is the applicable response.
If it is clear that the customer was just being a jerk, you let the employee know both that you aren't scolding them / they were techincally right, but they also don't need to fight solely on principle.
More often than not, which side is right is not obvious. At that point you do the same with the customer, but you let the employee know they aren't in trouble. That doesn't mean if the same type of problem keeps happening that you ignore the pattern.
The idea that the manager or employer is enjoying seeing the employee squirm is faulty. The more things are running smoothly, the easier it is for a manager. I always hear this advice being given to a newly minted manager/supervisor: "If everything always ran perfectly, there would be no need for your position."
And you will eventually have an employee that does some stupid shit where it is clear as day that they did the stupid shit. It is unavoidable. It is a horrible feeling that you will have to fix it. And that means you will probably be taking money out of your pocket on both ends. The customer gets reimbursed and the bad employee still gets paid for their time being a jackass. All you can control is if you want to keep employing them.