To justify is to give a reasonable explanations for ones actions.
For example, a good justification for lying to someone would be that they were going to do something awful to someone.
Even though you did something wrong, you were doing it to cause the least amount of long-term harm