As unfair as it sounds, yes this is probably legal. That is unless doing so violates company policy or the term of an employment contract or union agreement. Also, this action must not constitute some form of legally actionable discrimination. The fact is that most employment is "at will". This means that a company can set the conditions of work much as it sees fit. And this includes an employee having to find a substitute to fill in for them in the case of illness.