Free Software can be sold, you could also resell it if you want, or give it away.
You are quite wrong here, very likely confusing patented codecs with closed software. Software patents are only enforced in about 5 countries, the rest of the world simply ignores that. For example, both lame and x264 are open source projects; and there is an x265 project too.
Originally Posted by Krysto
Also, Free Software (as in FSF) can be compiled to any platform and run for any purpose, and yes, can also be sold; all you need to do is keep the 4 freedoms (ie. provide the source when requested, etc). The fact that the proprietary iOS only allows apps to be installed via their app store is outside VLC. You "could" get the VLC app for iOS and find out "another" way to install it.
Users living in one of those 5 or so software patent oppressed countries are supposed to sort out and purchase licenses for each codec, or the vendor of the software could pay it for them and pass it along the purchase. This is why some linux distros don't include the offending codecs by default, as they don't "sell it" for money, but some distros (ie. Zorin Premium) do and include codecs.
Apple being Apple is probably just adhering to the US centric point of view regarding codecs.