Why would the nonpaying client, or future potential clients, care what the developer does with his property? If they wanted it, they could have bought it from him. (I'm assuming that the developer didn't sign any IP assignments upfront, or is violating any NDAs or similar agreements about this code.)
If I was a sculptor and a client commissioned me to create a work of art, then didn't want it, surely nobody would fault me for donating the work to a local school instead of destroying it.
I disagree that the commissioned art analogy applies directly. My argument is that this was not a work of art, but a business tool, designed to provide the client with a competitive advantage. Donated art doesn't harm the commissioner, but publicizing this code CAN harm the client. A competitor can take this code and use it against the client now.
It does sound like there was no proper contract between the coder and client, which means there were probably no NDA or IP contingencies, which also explains why the coder was able to work for 200+ hours without seeing a dime. I believe the coder is in the right here. I just wonder if what he did was best for his career. It looks like most of HN agrees that it was.