Pretty much, and to get Martinez to the AL where he could DH. I doubt the Cardinals would have made that trade if they knew they could have DHed Martinez. He's a remarkable guy: looks like he has the body and skills to play either 1B or a corner OF, yet he's laughably abysmal at any defensive position.
Martinez absolutely bombed this year. He's in arb-3 status, according to sportrac, so there's a good chance the Cubs let him go. 32 years old. OTOH, would $2MM he's cost really kill them?