Newspapers and other print media have no legal duty to publish the name of any author or source. Publishers have broad discretion to make decisions about what to print. The U.S. Supreme Court has recognized the importance of such editorial discretion in ensuring the First Amendment guarantee of freedom of the press:
“A newspaper is more than a passive receptacle or conduit for news, comment, and advertising. The choice of material to go into a newspaper, and the decisions made as to limitations on the size and content of the paper, and treatment of public issues and public officials – whether fair or unfair – constitute the exercise of editorial control and judgment.” [from Chief Justice Burger’s opinion in the unanimous decision in Miami Herald v. Tornillo, 418 U.S. 241, 258 (1974)]
There may, however, be ethical obligations to consider — for example, the Society of Professional Journalists Code of Ethics says journalists should:
“Identify sources whenever feasible. The public is entitled to as much information as possible on sources’ reliability.”
One other consideration is what happens if an unattributed statement or anonymous author becomes the subject of a defamation lawsuit or is relevant to a criminal investigation. Then, a news organization may have to identify the source or author. This is mostly about identifying witnesses or suspects in the service of the legal process (so police can identify criminal suspects or so a plaintiff can make his or her case and can properly name potential defendants). A publisher who refuses to identify an author or source when a judge issues a subpoena demanding such a release will likely be held in contempt of court. Texas, of course, recently passed a reporter shield law to make it harder for prosecutors and plaintiffs to force journalists to divulge confidential sources (see Texas Civil Practice & Remedies Code § 22.021 et. seq.) Congress is considering a similar law that would apply in federal courts (see H.R. 985 and S. 448).