Earmarks are orthogonal to corruption. An earmark simply allocates money to a specific project; a member of Congress who steers money to their district is not "corrupt," he or she is just looking out for the citizens they represent--which BTW is their job.
An earmark is only corrupt if it is bought--that is, if a citizen or company bribes the member of Congress to steer an earmark to them.
When earmarks were killed, there was actually little evidence that was happening. Earmarks were killed as a talking point about reducing spending. Which is silly, because earmarks allocated funds, they didn't appropriate them. That is, they typically divvied up the pot, not increased its size.
It's sort of like the debt limit. Politicians lie to people about things work, in order to attract votes. I don't know if that's corruption so much as cynical opportunism.