In software development, where the cost of mass production is relatively small, it is common for developers to make software available at no cost. One of the early and basic forms of this model is called freeware. With freeware, software is licensed free of charge for regular use: the developer does not gain any monetary compensation.
With the advent of the free software movement, license schemes were created to give developers more freedom in terms of code sharing, commonly called open source or FOSS. As the English adjective "free" does not distinguish between "for zero price" and "liberty", the phrases "free as in beer" (gratis, freeware) and "free as in speech" (libre, open source) were adopted.
These phrases have become common, along with gratis and libre, in the software development and computer law fields for encapsulating this distinction.
via en.wikipedia.org