I have developed several scientific code packages with support from the NIH (US National Institutes of Health). There is a requirement in the boilerplate of a typical NIH grant award that the resulting programs are treated as open source. Now the NIH definition of "open source" probably does not meet the criteria of the OSF, but it does satisfy the scientific concern that other researchers using the programs can inspect the source code for themselves to verify or understand how it works.
If the software is later commercialized, this can introduce complications. But, at least in my field, the norm for commercial software developed academically is to charge what the market will bear to pharmaceutical companies but make it available at no cost, usually with restrictions on further redistribution, to other academic groups. Schroedinger was mentioned in an earlier comment, and provides a case in point. They charge a nice fee for their stuff commercially, but at least some of their packages are also distributed as standard RPMs in various linux distros. To drag in mention of a separate thread, this is/was one of the nice features of Mandrake/Mandriva. They offered a nice set of chemistry-related packages, although in recent years this wasn't kept up as well as one might wish.