They might think that earmarks should be banned, but while they are in congress it is their job to fight for their constituents to get what they need.
This is the same thing, Obama thinks that these superpacs are bad things and that we'd be better off without them, but as long as there legal he pretty much has to use them to have a fair shot at getting reelected.
Let's say you were coaching a college baseball team and thought that all teams should switch to wooden bats for safety. Should you switch your team over while everyone else still uses metal bats? Nope, it puts you at a disadvantage, and everyone is still going to be in danger from all of the other metal bats still being used. Therefor, you are not being a hypocrite for arguing one thing and being forced to do another.
I don't expect everyone who thinks we should go back to the gold standard to trade all of their money in for gold.
I also don't expect a candidate who thinks that the campaign rules should be changed to put himself at a severe disadvantage.