As much as we know about the CPU AI, they still sometimes go for crack move choices. Recently I've seen a Toxicroak go for Cross Chop on Politoed over Gunk Shot on Ludicolo, where the latter would be an OHKO. Toxicroak gets a Critical with Cross Chop, but that's beside the point. So the only way I can make sense of this is that it predicted that Gunk Shot would miss. Or in your case, Stone Edge. I don't think there was much of a way to predict a double EQ there. As much as they love to use Earthquake when their partner is immune, to expect them to use it over a KO shot would be pretty crazy.