Developers who write software can release it under the terms of the GNU GPL. When they do, it will be free software and stay free software, no matter who changes or distributes the program. We call this copyleft: the software is copyrighted, but instead of using those rights to restrict users like proprietary software does, we use them to ensure that every user has freedom.
It's free as in freedom, not free as in beer. There is no legal reason a person or company can't charge for
open source software. In fact, you don't even have to do anything. If you make an awesome app and release it
open source and release it for free onto the net, I can then take your source code, change nothing, compile it, and then sell the resulting binary. The "free" part comes from the source code: if I sell the binary of a GPL program, I must make the source code available to the people I sell it to.
Of course, even if I do make significant changes to the program, make it mine, and because of all the awesome modifications I've made to it I decide to sell it, there is absolutely nothing stopping someone who has purchased the binary from requesting and receiving the source code, compiling it themself, and then releasing it to the internet completely free (as in beer).
So while there's no legal reason not to charge for GPL software, there is the logical reason that someone is likely to just spread your source code around against your wishes, and they have the legal right to do so.