Read the article:
A seemingly deciding factor in Judge Lewis A Kaplan’s opinion on the matter is the fact that C.D. spoke to a number of people, including Rapp and members of the media, about his claims of Spacey sexually abusing him in the early 1980s, when the now 50+-years-old plaintiff was a minor.
“The evidence suggests that C.D. knowingly and repeatedly took the risk that any of these individuals at one point or another would reveal his true identity in a manner that would bring that identity to wide public attention, particularly given Spacey’s celebrity,” Judge Kaplan wrote in his 20-page memorandum opinion (read it here).
Accuser talked to the media and risked his identity being exposed publicly multiple times so the judge doesn’t accept their arguments for their name to be kept anonymous.
If you are willing to talk to the media and have them know who you are then it should be the same with the court proceedings.
Personally I want Spacey to face the consequences of his actions and don’t care about the accusers name but I’m no judge or lawyer either. I assume they have to keep certain standards for when accusers can stay anonymous or not.