Five-year deals were relatively common under the old CBA, when it was easier to qualify for them. We're just now seeing the end of those types of deals. The appeal for taking the longest-term deals is the same now as it was then, when players like Artest, Ariza, Haslem and Miller were signing them. Players without much upside tend to be okay with stagnant salaries if it gives them a lot more guarantees. While Green may well bet that he'd get a big deal in 2017, it won't be because his value went up. Not to mention that it's really uncertain what types of teams would be willing to break the bank for him in three years.
If the Spurs get a star next off-season they'll stop trying to sync up their salaries for a few years. If not, they'll stop by 2017 or 2018, as they don't project to have much cap space after that unless they have fallen off. Whenever future cap space stops being important to them, their goal will just be to lock in their talent for the longest they can at reasonable prices.
If Duncan reups, then the Spurs will have a pretty clear idea of how much longer he'll play. I imagine he'd sign a one-and-one deal through 2017, which fits their assumed plan B for cap space. That year is so important to them that they structured Diaw's contract so that he's easily cuttable. They also gave Mills only three years instead of four, even though Patty is a young piece who could have been locked up for longer. If they view Danny as just a compliment rather than a core guy, then it doesn't make a whole lot of sense to have him on a reasonably large deal taking up cap space that they'd need for a desperate attempt to chase players to put around Leonard.