I think this statement weird. End-to-end encryption is very recent, the data asked by the judge is for communication made before this feature roll-out. So I'm assuming Whatsapp do have the information for these two particular cases. But I could be wrong.
Anyway, maybe they are just using it for PR support on their position against the court decision, betting that all of that Telegram new users will come back to Whatsapp after the suspension (that's what happened before).
WhatsApp publicly stated[1] in testimony before the Brazilian Congressional Committee on Cyber Crimes in December 2015 that they do not, and have not ever, retained the content of communications—regardless of E2E or not. Apparently, WhatsApp only retains messages until they are delivered.
When I buy a new cell phone my Whatsapp conversation history is lost but my Facebook message history is not. It's likely that Whatsapp discards the messages from their servers immediately after they confirm it has arrived to destination (the two check marks).
If the communication was made a long time ago, Whatsapp may no longer have it, encrypted or not.
You are assuming, just like the judge. That is not correct, you should trust in the company when they say that. The hole world works as that, trust. A judge cannot assume that they have that data, because they don't. This judge just dont have any tech acknowledge, thats the problem, people that dont understand what they are doing.
BTW, its not End-to-end encryption related, is just that they dont store that data in anywhere.
Anyway, maybe they are just using it for PR support on their position against the court decision, betting that all of that Telegram new users will come back to Whatsapp after the suspension (that's what happened before).