While no laws explicitly prevent restaurants from donating food, concerns about potential liabilities tied to foodborne illnesses can act as deterrents. However, there are laws like the Good Samaritan Food Donation Act that provide certain protections to food donors.