No, not even close. It is 100% ethical to sell software but not the source to it. It isn't a social obligation of any kind to do so. You may choose to do so but you can't force that choice on others.
Not every ethical notion needs to be legislated. I don’t think anyone is suggesting everyone enforced to publish all source code, however, not releasing source code can be perceived as unethical...or shady AF if that makes more sense.
The fact is, it may protect against piracy but practically all consumer software nowadays is doing something on your device that you wouldn’t approve of. The only realistic way for a user to know how their resources are being used would be to look at the source code.