Imo it isn't a moral decision, it is a business decision. And what best achieves the teams goals sets the basis for the decision. Being mathematically eliminated is not a threshold at all for being fair or moral to the drivers, the team doesn't need to be fair to the drivers at all other than what is written in their contracts!
Just think of the drivers that didn't make or were cut from the team, they don't even have a chance to race. Is that fair/moral? What about the morals around getting a drive on an F1 team, it is alot easier if the driver brings money. It is a business and team orders play a part.
Business and moral should not be mutually exclusive. IMO it can't, or should not be, only about results. What is the only objective way of being able to tell the right time to help one driver? When the difference between them is 10, 20, 30 points? Maybe in the last 3, 4, 5 races? There's really no fair way of deciding unless No. 2 has no mathematical chance. After all, all results count for a driver, races won, races won against his teammate, etc., not only WDCs (for example, maybe Massa's slump is somewhat a result of Ferrari's neglect towards this idea).
And contracts can be immoral too. Even when Massa had to sign a contract where it says he's No. 2 (which is probably the case), that does not make it right to make such a contract.
Finally, it's not only morals vis a vis a driver I am talking about, but vis-a-vis the sport and spectators (i.e., you and me). If, as a spectator, you pay for a seat to watch a car race (to me that is mostly car to car fights, so overtaking attempts, blocks, etc.), is it ethical for a team to tamper with this very essence of motor racing? Isn't this similar to fixing a boxing fight? A football, a tenis match? Of course, if you just open the newspaper at the end of the season and are happy that your favourite team, driver won (even if that means, for example, that they asked another driver to crash), then this whole line of reasoning is irrelevant.