I'm not a roster expert but I was asking about the same questions too, and I think I might have an answer. The rules governing rosters are arcane sometimes, and I think one of the lesser-known rules is at play here.
First, no, a player is not more valuable after being added to the 40. Indeed it's the opposite, because when off the 40 you can do anything you want with him (except protect him from Rule-5 after the requisite number of years, or prevent him from declaring free agency after a few years more), while when he's on the 40 then he's taking up a limited resource and you have to expose him to waiver claims if you decide to take him off. Prospects who are still years away from Rule-5 decisions are more valuable in trade than prospects who are Rule-5 eligible, all else being equal, unless their talent and development are so high that their place on the 40 is obvious.
It was Rule-5 draft considerations that caused Legumina to be added, as we all have discussed by now, and there is one proviso that gets mentioned now and then - a player added to the 40 in advance of that draft (and I don't know if this applies to every player) must be kept on the 40 until some time after the off-season (again I don't know exactly, maybe it's the same date as when the 60-day IL opens up again in Feburary). The purpose seems obvious, to keep teams from "hiding" a player specifically for the Rule-5 draft, then DFAing him shortly after.
And so we have a third detail I'm not certain of, but which may be important: does this restriction carry over if that newly-protected player is traded? Based on nothing more than the sequence of events we've just seen play out with Legumina, I am betting, "no."
If this chain of guesses and suppositions and half-remembered facts holds up, then it looks like the two teams agreed in principle to the trade some time ago, and the Reds asked the Twins to do them a favor and add Legumina to the 40 in advance of the trade. The Twins had room so they did it. After all the dust has settled with Urshela and Legumina leaving and Farmer arriving, the Twins are back to having one extra spot available on the 40.
Look for Legumina to be quietly passed through waivers sometime this winter, at a time of the Reds' choosing when they think everyone's roster is full. If he's not then I'm back to being puzzled why the Twins made the roster move themselves.
I hope someone chimes in if they have any corrections to offer.