Logical fallacy
Confusing explanation with justification
The argument assumes that showing why someone acted as they did establishes that the action was morally or rationally justified. A causal explanation can apply to wrongful or unreasonable conduct.
Examples
Rina missed the vote because she overslept. That explains it, so she was right to miss it.
We can explain the forged score by the coach's pressure. That explanation makes the forgery acceptable.