In the case of working hard, Ali wouldn't have been fired.
The sentence suggests that if Ali had put in more effort or diligence in his work, his termination could have been avoided. It's a conditional statement that implies the importance of hard work and its potential to influence outcomes in the workplace.
This structure is often used to express hypothetical situations and their possible results.