He's coming off an excellent second half, and a solid postseason. While he doesn't deserve quite that much money, it's just the Yankees' attempt to appease him, and not make him feel like they're lowballing him.
For what it's worth, his 2009 WAR was 3.3, and, according to fangraphs, he was valued at 15 million dollars (and that doesn't include his postseason contributions).
I also feel like a guy like Pettitte, if he felt he was being lowballed, would just call it a career.