It has to do with how AI budgeting works now, and the lack of pacing / compartmentalizing and means thereof currently available in scripting.
Ive spent hours trying to adress this for my AI mod, without forcing it with triggers, to no avail.
Basically, the AI functions through weighted circumstances. At some point, it determines its worth having morr armies. So it starts producing them. Everywhere, quing them up as much as they can afford, rarely even canceling construction when the need gets filled; they can have 1 army less than they want, and still start production of 20 more...
The same problem is prevalent with other construction the AI does. Its less noticable, but still problematic - particularly while the AI remains unable to replace buildings or districts (nor can ot repair them)
With armies, this is partilly a result of minerals being abundant and not directly tied up in other expenses during war time...