Pharmaceutical companies typically aren’t offered much liability protection under U.S. law; but in circumstances of a pandemic, the U.S. government needed to assure pharma companies of blanket immunity law to get a vaccine out and widely distributed. Furthermore, if there was legal risk for the pharma companies for the COVID vaccine, the company would increase the cost of the vaccine to build-in legal risk.
https://www.swfinstitute.org/news/83759/covid-pfizer-moderna-and-other-vaccine-makers-get-legal-immunity-for-some-time