- What about purely not feeling like you have all the relevant data and knowledge to comment on something?
It's perfectly normal to say you can't comment on something because you don't have (or feel you lack) all of the relevant/needed knowledge/information. The added incentive for the politician is that he's a public figure who (usually, but not always) has a public reputation to uphold and uttering inadvertently something stupid without research and preparation can have disastrous consequences.
Politicians in the western world are there mostly to drive policy. They do not need to be (and usually are not) subject matter experts. Their ideal role is to propose decisions based on discussion with subject matter experts and then make sure as much of the proposed decision passes through the negotiations as intact as possible (or ensure to cram as much of their agenda into decisions and propositions of others).
Asking a politician (or a lawmaker) about a specific court case is like asking a roofmaker about the weather. He can tell you that the roof he makes should be able to survive a hundred-year flood, but asking him about particularities of a hurricane in the west Atlantic is a bit out of his scope of expertise.
You can extend this reasoning to anybody who's not a subject matter expert on something and even on subject matter experts not personally involved in something.
- Politician is a public figure representing something. Anything they say anywhere is taken in the context of them representing their office, their party and their country.
If you ever worked in a public-facing setting for any self-respecting large company, you know there are codes of conduct ensuring you're properly representing your employer. Uttering something/anything in public setting on anything not related to your expertise AND the matter at hand is a MAJOR no-no!
Just imagine the headlines the day after you answer a question about Roe vs. Wade as a U.S. Republican senator.
- All of this combined ensures you want to say as little as possible about anything not related to your expertise. Just saying you can't comment and not giving a reason why is thus a continuation of this.
The more you say about anything as a politician, the more you give ammunition to your opponents to twist your words against you.
Unless you're a subject matter expert personally involved in the case with perfect knowledge of all of the particulars, who is also sure that no new evidence will emerge, then it is very unwise to comment on anything as a public figure. Your opponents can use your comments to attack you. Why the hell would you comment in that situation?