Earmarks are only a vote on how to distribute money already in the budget, not a vote to add money to the budget. Dr. Paul's reasoning was that if the money didn't go to earmarks, it would go not back to the general taxpayer, but to the Federal government. In other words, giving money back to shrimp farmers was better than giving it to the Federal government.
Lest it seem like I am going to defend Dr. Paul no matter what, I admittedly don't really like this kind of "Next bestism." Voting for earmarks is still, in essence, a support for their existance. Voting no is the more principled stance. Ron Paul does redeem himself by voting no on the entire budget, but really, if the budget is wrong, you should only be trying to cut it, not make spending more efficient. On the other hand, I think this is an acceptable sacrifice of "Principle" if indeed there is any. Its keeping money from the Feds, that's his point, and it allows him to maintain his seat. I can understand it.