yeah, the problem is when units that have AoE attacks target someone who is only a tile or so from themselves. They won't 'offset' target, so end up hitting themselves as well.
It would make the AI a bit more dangerous if they actually offset the center of the AoE to not include themselves (or allies). Juggernauts are fun when you position 1 unit next to the rest of their army so that the Jug can wipe their allies out.