I've had melee enemies occassionally go for the backline, so it isn't always attack the closest. Except it isn't working very well, because they ignore whatever is in their way, including attacks of opportunity or aoe spell effects.