It doesn't even matter what he was doing with his time. If his employer wasn't satisfied with what he was producing it's in their best interest to let their employee know they need to correct the situation.
Firing him means they were in panic mode because they were lazy and decided not to manage their employees.