To prevent such a situation, the attacker has to allocate the attacks to the different units before rolling them.
So the orcs player has to choose how many attacks he strikes against the skelletons and how many against the giant. He can also focus all attacks against one unit, it depends on the situation.
So the attacker is free to choose what unit to strike. (as long as the the attacking stands have base contact to the target of course)