In games AI doesn't really look at the map like the player does. A player may look at things like I have a fleet able to respond to this action. AI is complicated and its limited completing specific tasks. Keep in mind I dont know all the specifics of this AI.
The AI will give orders based on its needs that it sees and in order. So think of it like this.
I have 5 things that needs to be done
1. Send fleet to have a garrison on Planet X
2. Send fleet to destroy player fleet near Mars
3. Search and destroy targets near me
4. Send fleet protect to Earth
It might work these in order and if it has just the fleet ready for orders that you gifted them it might complete the garrison planet x before protect earth.
Once a fleet has its orders it will be stored in a buffer and act on them until they can no longer complete them it finishes the order. Some fleet will just be on sentry. So unless the AI is told to interrupt its order it might fly right past your vulnerable colony ship that stumbled into its sight if its already enroute. This is not always a bad thing because if the AI was reevaluating its orders every turn you would then be able to cheese it by luring it away by putting colony ships just at the edge of its attack range.
The AI designer will sometimes put interrupt to review those orders but AI is will generally always be bad at reactions. Also this costs time and many players don't like long turn times so the AI is sometimes limited how many orders it can review. Gal Civ has a unique problem as the AI is not given total map vision. Some players doubt this but if you watch the AI play using cheats you can see that this is the case. Anyways it might have given all of its orders and then moves its ships and creates a new task but since all the fleets have been already assigned it wont be able to respond to the new task.