Employment may be at will, but the courts are full of lawsuits against employers for wrongful termination/dismissal. If you've ever dealt with a large HR dept you know that one of their main jobs is to prevent lawsuits brought/caused by employees.
In most cases, unless there is a smoking gun, employers just sidestep the issue by targeting "layoffs", rather firing for cause.
The bigger issue HR deals with is sexual harassment or discrimination cases. And, even nuisance lawsuits can be expensive to deal with, and HR/clerical staff is a lot cheaper than lawyers.