Agree.
Priority should be closest enemy->farthest enemies, and front enemies->side enemies.
Now looks like it's totally random.