I usually play 3 or 4 to prevent the AI from dashing itself to death. You do not say what side you're playing but if you have a look at some of the files in the AI folder you will see that there is a considerable number of variables in how the AI manages commitment.
There are probably a number of reasons why you are seeing this and what follows is some educated guesses. As always, Calvinus' is the authority though.
- Leader obstination, if the value is very low it may have called off the attack as continuing might exceed the HQ obstination value. A timid Leader might save lives but also may miss opportunities by not pushing an attack;
- The target region may not be that important to the AI, each war plan has a list of objective areas that the AI will attempt to capture. If the region is not a priority the AI might not expend too many resources attacking it.
- One of the great aspects of WW1G is that the AI suffers Fog of War just like the player (although this is player configurable). The AI may break off the attack if it believes itself to be over matched. I believe that there is some randomization in the calculations but since you cannot see what the AI sees, it may have assessed your strength as greater than it is.
Snatching defeat from the jaws of victory is a military reality and it happened with depressing regularity in the Great War. The opposite was very common too, where no amount of effort could ever achieve the General's objectives and so hundreds of thousands died without a hope of success. WW1G models this phenomenon quite well in my opinion and it's possible all you are seeing is the AI getting some poor dice rolls causing it to terminate attacks on the brink of success.
If this really bothers you, try turning off Fog of War for the AI and see if there's a difference in behavior.