Yeah, the code you're working on is really treasure in disguise. Whatever gets you through the day...
If you are doing it for an employer it is at least worth what they are paying you for it. I would argue that qualifies as treasure.
No, in the programming world there are projects that met the revolving door of mediocre programmers that no one is proud of, no one understands how it works or wants to, everyone just finds a place they think will have the effect their being driven to make and takes a shot.
In the programming world, one man's treasure is inevitably another man's unreadable spaghetti dependency-ridden junk.