This is easy to test by modding out the standard anomalies and including only precursor anomalies (since these are always defended). The AI ships are unaffected by the encounters.
I am guessing this may be intentional (but not necessarily preferred) since there is no mechanic in the XML to instruct the AI how well-defended the anomaly is. Precursor anomalies require a decent fleet (for human players), and even the pirate encounters on ship graveyard anomalies should destroy an unarmed survey vessel (obviously). It would be nice if the AI was affected by these encounters.
Unfortunately, I don't think this can be fixed without changes to the code. My suggestion would be to consider tying in the fleet battle estimator (when you hover over the anomaly, it takes the encounter from the XML and uses that data to determine likelihood of success)--then the AI could estimate its chances of success and act accordingly... This would allow the AI to respond to any variety of encounters on anomalies (i.e., use smaller fleets for the weaker anomalies and larger fleets for precursor anomalies).
Early game, this is hugely problematic if the AI get precursor anomalies since they offer civ-wide benefits and larger sums of credits. I know these anomalies are somewhat rare, but this can happen, and it shouldn't.
The AI simply isn't playing by the same rules as the human players. (I don't want to say that the AI ch**ts because I know that's kind of a trigger word... but they seem to be ch**ting in this case.)