I think it is just a flaw of the game. Sometimes the AI manages to build siege equipment and attack on the turn they start a siege. A very annoying problem, especially if you are relying on relief armies.