For a team with the Cardinals' budget, I can see that as a reasonable gamble...sort of. Pitchers with torn labrums have a much, much spottier record of return to success, than say, pitchers with a torn elbow ligament or a broken bone or something. There's a pretty good chance that Mulder is just not going to be effective any more. On the other hand, you know what the upside here is--Mulder was a great pitcher when healthy.
Putting aside what exactly the budget situation is right now (especially considering that we don't know the exact budget situation--the Twins could be sitting on a small bit of money thinking that it might be better spent at the trading deadline or something), a 2 year/$13M commitment to Mulder seems like it would've been a pretty reasonable deal for both sides. On the other hand, it gets to be pretty difficult to fit Mulder in the budget if he gets all the way up to $45M/3yr--indeed, he'd be the highest paid player on the team.
I was holding out a stupid hope that maybe the Twins could snag Mulder at a discount rate, but I was mostly deluding myself. This is a better deal for Mulder than the Twins could have or should have offered.