Pirlo leaving Milan had to do not only with the length of the new contract but the amount of money too - both Ambro and Seedorf had their salaries slashed big time in addition to being given only 1-year contracts. Pirlo, however, is 2 years younger than Ambro and 3 than Seedorf, so I supposed he believed he deserved a better contract than what Milan were willing to offer.
Another important aspect, and possibly the most decisive in Milan letting him go, was Allegri's realization that Milan can do well, and possibly even better, without Pirlo ... and the coach also seems to favor dynamic, physically strong players in midfield as opposed to players of Pirlo's type. This, combined with the contract differences between offer and demand, lead to Pirlo's leaving for Juve.