Because I didn't RTFM, because I reinvented the wheel, because I used a bunch of shoddy workarounds, because yes that is a magic number, because that comment made sense ten versions ago but now it's just confusing gibberish and I'm to lazy to update it, because I didn't properly use Google or PM Super Search, because I didn't indent properly, because I used "or/and" instead of "||/&&", because I told myself "I'll clean that up later", because I didn't properly listen and understand what the other monks told me, because I decided to do it quickly instead of correctly, and because I stubbornly refused to learn how to use the module that would just do that correctly for me every time in favor of doing the code equivalent of insisting on screwing together IKEA furniture using a coin from my pocket just so I don't have to walk 10 feet to the closet to get a screwdriver...
...Oh, yes, and because I'm an idiot. :-)
Just another Perl hooker - My clients appreciate that I keep my code clean but my comments dirty.