To me it looks like most far away enemies not engaged in the fight have the hightest priority to be chosen as next target lol. Actually I have no clue how their system works.