One way is if the software is a marketing tool for selling something else. Then people sharing or using it is good for marketing the other service.
Another way is if the product is useless to the customer base in source form so they need to buy the compiled version, and aren’t technical enough to do it themselves.
But in general making software to sell needs a propitery license if you want to make money.