The Pats trading Jimmy now, not only gives them what looks like one of the top picks in the second round, and hopefully the coveted #33 pick (the Ras IR pick). But it also frees up the franchise tag for Butler.
If the Pats had to franchise Jimmy, the price would have been astronomical and would have hamstrung them with the salary cap until they finally traded him. This way they trade him without having to deal with Jimmy's salary demands.
I highly doubt that SF trades him, as they are already going to have a top pick in the draft and can get much more by trading down from that pick, than they ever could from a franchised Jimmy.
This is really a low-risk move for the 49ers.
They will have Jimmy for half a season and can make a better evaluation than from a small sample size. They're paying basically NFL minimum wage for this option.
They should have one of the top picks to get a potential franchise QB. They can use it or trade it as you said.
They traded a second round pick. They would like to recoup that if they're not convinced Jimmy is the guy.
If they keep Jimmy, they can trade that pick and easily recoup the second (and more) that they traded for him.
If they prefer the potential franchise QB draft pick, they could potentially auction Jimmy off for a second, recouping their investment.
There's also a risk Jimmy craps the bed. But I still think they could get a 3rd or 4th in that scenario during the draft from a team that misses out at the top for their QB.
The Browns/Texans deal for Osweiler also brought up some potential options for creating NBA-style salary dumps. I could imagine the 49ers using some of their ample cap room to create a friendly contract that gets a ton of money for Jimmy put on their cap (signing bonus), then traded to a team in exchange for a much better draft pick.
So if let's say Team A is willing to trade a 2nd for Jimmy, the 49ers could offer something like say 4 years, $85M, $50M in guarantees with $30M from a signing bonus. Then they package him up and trade him so they eat $30M in dead money, Team A gets a starter for 4 years, $55M, with $20M in guarantees. They could even guarantee the first year salary to minimize the risk moving forward.
A top pick like Jared Goff signed for 4 years, $27M as a rookie. So you could be a bit more than a rookie, but well below-market for a key starter.
Obviously the 49ers would need a lot more than a second round pick to sacrifice that cap room. But if they could get 2 1sts and 2 2nds, don't they have to at least consider it? Especially if one of those picks turns into a star? A top draft pick would save them $20-$30M in salary over the course of the contract anyways, so as long as they hit on 1 of those 4, they'd really be even in a way.
I don't know if that's the best structure, I'm sure there are smarter ways of doing it. But there are a lot of possibilities for the 49ers.