If the employee loses the stock when he's fired early, then the company has a huge incentive in firing him a day before he vests, and thus he should regard the vesting compensation as nonexistent.
If the employee retains the stock when he's fired early, then he can just get himself fired to ignore the vesting period, making the vesting pointless.
It seems that vesting can only work if the employee is so essential that the company would never fire him because the company would then be highly likely to fail, which should only apply for founders in a functional company.