So lets approach this from the gamers POV during code time?
on tick 1, player Y enters room with healer full health. since the information the coder has druing tick 1 is 0 damage to his creep, he wont order the heal on his creep within the next tick.
on tick 1, player Z order tower to attack player Y's creep. damage will be allplied on the next tick.
on tick 2, player Y has the information on damage on his creep, he orders the heal on the next tick
on tick 2, player Z orders another attack on player Y's creep. damage will be applied on the next tick.
on tick 3, we have the scenario of heal vs damage for the first time... in order of fairness, process all heal commands prior to all damage commands now. meaning, that all heals commanded on tick prior to the current one, apply the heal and then the damage gets added.
there is no feasable way, for a "coder" to start guessing on whom to preemtivly heal, if the order was vice versa. Also, i believe that is common sense, that i would not order a heal on creep, that has full health (scenario in tick 1, could have preemtivly healed... but why would i? i dont even have the information of being damaged anyway...)