Is it legal to be fired from the company during bail? Is there any corresponding compensation? I have been working for ten years.

Illegal.

Bail pending trial is only a compulsory measure, not a punishment. Bail pending trial shows that there is insufficient evidence of guilt, or even if guilty, it is not a felony, and the circumstances are minor.

Bail pending trial is not a punishment for criminal suspects, nor does it mean that they are guilty. According to the law, no one can be found guilty without the judgment of the people's court.

Since it is not found guilty, the unit should not punish it. Expelling is wrong and illegal.

Labor arbitration can be filed, and the unit will definitely lose the case.

However, when the contract expires, the unit has the right to terminate the contract. The compensation is one month's salary for each year of work.