Or how they can be attacked by ground troops at all? This isn't Magic the Gathering, so I assume that flying is so exhausting that it can be used for movement on the battlemap, over short distances, but not by hovering in mid-air all the time. But really, would it be different then flying would be overpowered.
If the flying unit is going to get in range to attack something, then that something will obviously be in range to hit back and trampling can then be considered the trampler knocking the flier out of the air and stomping it to a pulp. Suspension of disbelief. Look that one up.