Generally speaking, auto-targetting is guided by the damage tables...I'm going to take a guess that your fleet was mostly LFs, which are best against heavy armor (the armor type of flak)...the LFs attack the flak first because that is what they are best at killing...
I won't claim the system is perfect, but target selection by armor type I would say is preferable to what you are proposing (where all units follow the same hierarchy of target selection)...consider two fleets: fleet A has LFs and LRFs while fleet B has flak and LRFs...your hierarchy would make all of fleet B attack the LRFs first...however, it is more efficient for fleet B's flak to attack the LRFs while fleet B's LRFs attack the LFs...by having each unit target what it's best at, you provide the most efficient means for destroying the enemy...
High value targets like caps or siege frigates should be enough to get your attention and force you to micro your fleet...also, it is not always wise to go for the cap first (wiping out large amounts of frigates, or key support ships may be a better idea) since caps are harder to kill and may cost you valualbe time you could have spent wiping out frigates and reducing enemy firepower...