If it works similar to programming ai in MUGEN, the AI also chooses paticular actions on certain situations.
Some examples, if the player is in attack state, it might make the CPU guard (if trigger = playermovetype = True, CPU goes into guard state) Or if the player is x pixels away, it might trigger the CPU to dash forward. Or if the opponent is in range to throw the player, it performs a throw (trigger = Player distance is x or fewer pixels away and isn't in hitstun = True) Obviously it's usually more complicated than that, but it's the basic gist. Also, I'm sure Capcom/SNK randomize it so they don't always do the same thing.
I think some ai actually reads the player's command input, too. That's how they have almost pyschic reactions to whatever you do. They read that you press, say fierce punch, and triggers them to counter it, if they are in range.