Actually, you could have been fired for this or any other reason, or even for no reason at all. That is unless your termination in some way violated a provision of any applicable employment contract or union agreement that you may have had. The fact is that most employment is "at will" which means that your company could have set the conditions of your employment much as it saw fit (absent some form of legally actionable discrimination which you did not indicate to be the case).