By retreating the AI is forcing you to defend more provinces splitting your forces making you more vulnerable to both counter-attack and to rebellions.
If only it wasn't possible to defend captured provinces with a reserve army of just peasants and spies while your main army advances then the AI's strategy would be a good one.