QB is the most important player on a team, and the hardest position to play at a high level in sports today. If you are a Allen, Mahomes or Rodgers, you want to be paid what you consider to be full value for your skills. There just are not too many teams that have won a championship without having a high level QB, and if you have one, you are going to do everything in your power to keep him. Which means paying him 30 to 40 million a year. It's the price of success, hell, look what the Vikings are paying Cousins, and he is a little above average, but the best they can get.
That is what makes Purdy special right now, he is playing at a high level, and is dirt cheap for the next two seasons after this. The 49ers have the ability to use that money that they are not paying Purdy and go out and get better players at other positions and pay them well. It's not going to last forever, the closer Purdy gets to FA, the more money the 49ers will be forced to pay him if he continues to produce at a high level.