This even happens in single-player, so it's not a lag issue. About 10% of the time your guy will just ignore orders to use special attacks, even if the target is well within range. Give the MMO style of combat with juggling specials, cooldowns and mana, this pretty much totally borks you because you THOUGHT you'd dotted the guy and you haven't.
This is made MORE amusing because often, the game will glitch with teleporting/whatever, and you'll be able to hit a target well OUTSIDE the attack's range if he ported right near the end of the warmup.
Attacks that don't have a target never display this issue (like turning into mist to avoid a giant hammer, time-critical but never fails). I speculate it's related to the absolutely terrible pathfinding (oh no my minions got stuck on a corner and I had to micro them around it lol) and for some reason you guy is deciding he'd have to move first (maybe there's something in the way or whatever). It is so random it can happen if the target is right next to you, stationary and stunned (especially if there are other god/mobs around).