He should have AGPL3'd this code, and put a standing offer for a royalty-free unencumbered free license to anyone who contacts him directly. The net result would have been the same, but his deadbeat client wouldn't get the code for free.
... because the AGPL would for sure stop them from using the code without giving anything back considering that they didn't even pay the author for his contract work.
By releasing the code under a permissive license, he gave up that recourse. His client's right to use the code is now a grey area. Technically, he has the same recourse in court as he did before; contracts. But he's severed the connection between that and the deployment of his code.
I'm not expressing nerdly outrage at how he did it. I'm simply suggesting a tactical refinement for the next person who decides to dump dox to Github when a client doesn't pay.