The cost of copying information is zero. Software piracy is inevitable if you distribute code, in any form. Keeping code behind a barrier is a very natural way to monetize it. In the same way that consultants offer their expertise not in the form of guidebooks to learn how to be a consultant, but charge per the hour for expertise on specific subjects, software is not sold as is, but metered per value provided, for specific cases.