If it's hot enough to burn your lips it's hot enough to burn your skin. Generally coffee is brewed at close to boiling temperature; it doesn't get much hotter than that. If it's freshly brewed, it's necessarily going to be hot enough to cause serious damage if you pour the entire cup somewhere sensitive. I guess it would be nice if they waited for it to cool before serving or something, but I don't think serving freshly brewed coffee ought to be illegal. (And even if you disagree, certainly that's a policy that should be enacted through the legislature, not arbitrarily and ex post facto by the courts.)
Even from afficionados the best temperature at extraction time isn't near boiling. The best drinking temperature is even lower. Typical temperatures at other chains are in the 140-180F range. McDonald's chooses to use much higher temperatures for ... reasons? Their customers don't want it, and their scalded patients don't want it.