Well, there's some nuance. I'm not really proud of my code. I'm proud of the software that gets built with it.
Code is just sitting in a git repo somewhere, not necessarily running. That's a big distinction for me. Consider that code volume has increased 14x on github this year, but we see nowhere near that increase in the actual usable software. Code is cheap and getting cheaper. Running software ain't.
Another way to put it: I'm only interested in code so far as the value it provides. That value, not the code itself, is the source of pride. If I can provide similar value without any code at all, I'd gladly do so.
But code is the mean to get an idea across to someone. It’s the difference between “I think this can work” and “I’ve worked on this and it does work”. I’m part of the OpenBSD mailing list and it quite nice someone sharing a diff for an idea or experiment. It may not get merged, but it’s better than realm of deliberations.