An escort's behavior is determined by the way the escort is obtained. Escorts hired from a spaceport bar and escorts assigned to you through a mission you've accepted will defend you if you are attacked. Escorts that are captured generally will not do much for you in terms of defense. The best escorts are the fighters you purchase. The main difference between fighters and "normal" escorts is that you have a finer degree of control over your fighters' actions. "Normal" escorts will only fight ships that are a threat to you, whereas you can order your fighters to attack specific targets.