You're correct in that there is no law saying that employers are prohibited from disclosing why a person was fired. But the policies are a result of laws that could open them up to legal action if they were to disclose any specifics. However unlikely that legal action may be, and probably even more unlikely to succeed, they still gain nothing from any such disclosures so it makes perfect sense to prohibit them.
Exactly. Any such disclosure gives a foothold for legal action that could drag on for a long time and cost a fortune. Even if you win, you lose, so why take that risk?
Employers airing dirty laundry is way worse for morale. Typically the people who work in close proximity have a good idea of why their colleague may have been fired, or can reach out to them privately to get details. If the fired employee doesn't want to talk about it, it's presumably something private, and the employer probably shouldn't either.