Dumping Marquis is a no-brainer. He's a free agent at the end of the season, and he hasn't done enough to return any draft picks for the Nationals if they lose him at the end of the season. So literally the guy is worth nothing to the tail-spinning Nationals. Plus, he's got over $2 million more dollars coming to him.
Worse yet, he's blocking prospects. Brad Peacock is definitely ready for a look against big league competition but someone had to go to make room. (Tom Milone is getting lots of love from Davey Johnson too, but I'm less convinced on him.)
My biggest question about trading Marquis is if there's anyone out there who would want him--or would be willing to give anything up and take the remainder of his contract anyway. We're talking about a pitcher who has a 3.95 ERA, which sounds good, but is actually a tick worse than the average performance by starting pitchers in the NL this season.
But Arizona came calling, and in return the Nationals got Zack Walters. He's a 21-year-old infielder hitting .302 / .377 / .485 in his second season of pro ball. Baseball America mentioned a comp to Geoff Blum in the 2011 Prospect Handbook, where Walters was ranked #29, though his stock has risen and he should rank higher with the Nationals next time around. He's a shortstop now but projects better as a utility man best suited for second base or third. He's also a switch hitter, which adds to his stock as a future bench option.
Overall, the Nationals would have been better off just dumping Marquis and his contract for nothing, and they did well to get anything of potential major league value here.
The Jerry Hairston trade is a similar story. The Brewers were desperate to get a second baseman after Rickie Weeks got hurt (and they've been hurting for anyone, anyone at all to play shortstop and third base).
Rizzo spotted the opportunity to get the Brewers to overpay. You might never hear of Erik Komatsu again, but he's got a chance to have a career as a fourth or fifth outfielder. He doesn't have much power, but he's hitting got a .393 OBP in AA, which is impressive, and he's 23 years old, so it's not like he's old for the league
If you're a Brewers fan, you've gotta be pulling your hair out that you have to trade any kind of prospect for a guy like Jerry Hairston. It's absolutely embarrassing not to have someone you can call up or plug in to do what he does. But Rizzo spotted the need and got something for basically nothing.