The First Amendment protects media outlets’ right to publish information on matters of public concern as long as the outlets did not participate in or encourage the illegal activity to obtain the information. The Court typically weighs the public’s interest in being informed against the harm caused by the publication.
For example: A magazine releases details about unsafe practices in a food processing plant from a whistleblower’s illegal recording. The publication could be shielded by the First Amendment because it informs the public about health and safety concerns.