Why did the Federal judge make Cohen name his clients in open court?

Here’s the Vanity Fair piece I was thinking of:

“How Donald Trump and Roy Cohn’s Ruthless Symbiosis Changed America.” (With Special Guest Appearance by Roger Stone)