AI Defence Issues

Coming across defended areas I found that the AI did strange things with defenders. The first was the retreating of many units as soon as you commit, surely if they were put by the player their they should stay to defend

Also they seem to move out of fortifications into open ground, an interesting thing was when two bunkers were next to each other they moved between them, this made it harder to kill, but the moving to open spaces certainly made it easier