Yes. It's exceptionally unethical in most instances unless it's agreed upon prior to the work being performed.
In all probability the only reason this "program" was createscreated was due to the client paying you to create it. Any client paying you for youonly to then have you turn around and release, the product they paid for, for free is going to be very, very, very upset. Possibly even so much as to consider legal recourse.
In addition, the contract for the work may mean you don't own the IPIntellectual Property (IP) and would be essentially distributing it against the rights you have. No way of knowing this without seeing the contract.
In the end, the one thing you can be absolutely certain of is such an action will spark horrible word-of-mouth for your services from the client who paid you.
(I'm honestly amazed this is even a consideration.)