Not sure if this is a bug or simply greatly suboptimal AI, but I have even purposefully tested this a few times, and leaving my largest cities entirely undefended, and having a sizable and significant enemy AI at open war with me within 2 squares of city centre, results in the AI simply wandering past. What goals are these armies following? It doesn't seem as if they have any, since they are blithely missing opportunities right at hand to reap large rewards at no risk.