A lot of critics are blasting the niners over their handling of Lance, and I have to completely disagree with them. The mistake was drafting him in the first place. He was never going to lead them to success in his first or second season, and waiting for year 3 is way too long to be trading up in the draft to get. Their biggest and main mistake happened on draft day, and everything else was downhill from that.
The great success story of Purdy (and really any player who comes out of nowhere) has a flipside: some player losing their job. In this case it was Trey Lance. The niners got the wins with Purdy that they wanted with Lance. They could either pretend last season doesn't matter or they could accept that Lance is not their best option going forward. They chose to go with Purdy and it makes sense to do so.
Getting a 4th round pick and getting his salary off the books is a huge win for the niners as it is highly unlikely that Lance was ever going to make it work in SF.
The Cowboys overpaid, but they overpaid to be the team who gets the first crack at trying to build him up in a situation with much less pressure. If Lance is ever going to be a starting QB he'll need to start with the basics and fundamentals and go from there. He was already a project, but now he's a project with an injury history and one failed relationship with a team.