They will attack whoever is in the system, but they only appear at your enemies systems. Logically it makes sense somewhat, as they are fighting to free the system of its current rulers, whoever they may be.
If I'm winning a match vs the AI easily, I usually don't research insurgency, as it can be a pain with newly conquered systems. If it's turning out to be a long slog-fest, then I will usually research it.