Math and limited data probably. If the AI "sees" that its forces outnumber an opponent or a nuke doesn't affect it's programmed goals, it's efficient to just wipe out an opponent. To your point, if the training data or inputs have any bias, it will probably be expressed more in the results.
(Chat bots are trained on data. How that data is curated is going to be extremely variable.)