It's not free to build a platform, but I believe the cost has already been paid by the users when they buy their device.
No reason to have users pay twice, when they buy their device and when they try to use services on the device they already have.
Some apps pay for that effort with a cut of the app's retail price. Spotify pays for it with the tiny fraction of their users which (a) pay for it at all and (b) pay for it through their iOS device.