It's not that it's better. Armies in Warcraft use siege weaponry and artillery, but in an equivalent time (say the American civil war), though there were guns, ultimately battles were won in close quarters. I would imagine that it's a similar issue in Warcraft. No army really has the resources to keep fighting from a distance, and since other armies can't either, then it would be foolish to do so.
Even today, soldiers are being trained on how to deal with CQC situations. Why? Because it still happens. Even when you can blow a guy's head off from half a mile away with an assault rifle, you still get into situations where you need to kill someone up close, where guns are ineffective.