That's not how the legal system works. You can't take a random photo to court as evidence of anything. Whether it is AI generated or not is irrelevant.
I don't think GP is referring to the legal system, or at least not exxclusively. Think about what can happen within your family, social circle, neighbourhood, workplace etc.