Ironclad never really said what exactly the AI uses to determine when to surrender or not. If you just wiped out its fleet and its homeplanet, on a small map, I can see it surrendering because really it has no chance of a comeback.
Used to be that it didn't surrender at all, but people kept complaining that it took too long to mop up after the game is "decided", so they put it in.
Of course the problem is, everyone has a different definition of "decided". 