Well, I honestly don't know whether they're thinking ahead or actually just braindead. I know Japan's deathstacks over in China spent like half a year just standing around while the Brits sieged everything around them, until (or even after) I popped in for a second to give them some movement orders.
I'm kind of curious how late-game dig-in bonuses affect AI behavior, really. Does it know it needs to stand in place to use them, and if yes, does that make it stand around even when it shouldn't?