The Shulchan Aruch (607:6) writes that on erev Yom Kipur, everyone gets whipped 39 lashes. However, I have not seen this done in practice. Is there any source who justifies the practice not to do this? (The Be'er Heitev notes that the Arizal would lash only four times, but I still haven't seen anyone do this either.)
Nitey Gavriel (Yom Kippur Perek 20 Sif 19) writes that many have the custom not to whip on Erev Yom Kippur. He cites as a source Kaf HaChaim (O.C. 607:40) who claims that Erev Yom Kippur is considered a Yom Tov and we do not give lashes on Yom Tov. The Nitey Gavriel notes that this is the prevelant custom in Zitshov, Tshernobil, Gur and Amshinov.
I upvoted Michoel's answer. Still, there is a separate answer.
We practice minhagim because they are our minhagim, practices our community is accustomed to perform. Even if a halachic text happens to record details of a minhag, that does not promote that minhag to the status of halacha. It remains a minhag, and the reason for it is minhag, rather than halacha, and rather than that it was written in that halachic text.
Shulchan Aruch is a mix of Biblical law, Rabbinic law, and custom. It would be nice if these were each color coded, so that we could more readily distinguish between them, but they are not.
The Shulchan Aruch (and Rema) records this particular minhag, as it was practiced that slice of time and place. It is recorded in the Tur as the Minhag Ashkenaz and based on Beis Yosef there, is mentioned first by the Rosh. Presumably, it was a fairly prevalent custom, for it to be recorded so straightforwardly. But still, it has the status of minhag.
Either parallel to this, or subsequent to this, the practice in some communities was not to whip. You can ask, perhaps, whether this initial lack of practice was justified, or was a deviation from an initial practice. But regardless, the minhag developed not to whip. Minhagim often develop organically, as folk practice is wont to do, or for valid halachic reasons. This minhag then stands in its place in opposition to the minhag which happened to be recorded in Shulchan Aruch.
If so, we don't need a textual justification for a minhag, even if that minhag is the opposite of a minhag recorded in Shulchan Aruch.
Can we compare this to kitniyot? Sure. There is a prevalent custom not to eat kitniyot. If someone who was an Ashkenazi wanted to go against that custom, there might be a problem that אינו כדאי והגון לזה שיתיר דבר שאבותינו ואבות אבותינו נהגו איסור. And there are such precedents in the gemara. But nullifying a customary prohibition is different from nullifying an action, and keeping one's community's established nullification of said action is even more different.
I would need to see the Rosh inside, but this idea of punishing oneself in order to obtain kappara seems characteristic of the sorts of tortures the Chassidei Ashkenaz used to inflict upon themselves to atone for various sins. Rolling around naked in the snow, fasting, etcetera. This approach to life, in general, has fallen out of vogue. Do teshuva, regretting what you did and resolving not to repeat it, and Hashem will forgive you. You don't need to also undergo torture. (Of course, as the sources point out, this is not administered by bet din of semuchim, and so it is just a zecher to move someone to teshuva.)