1. They develop and maintain the marketplace
2. They process your transaction, run the payment gateway that interacts with dozens of banks in 100+ countries. they process transactions to the developers as well
3. Pay their transaction fees to banks and VISA/MC
4. Develop and maintain the SDK, and IDE etc that help the developers build the app in the first place
5. Keep your personal credit card info safe ( Then again, Perhaps not :( )
6. You may use your data plan but apple still has to host the files on their servers, considering the amount of free apps downloaded, the deployment costs are certainly non trivial
7. Most importantly ensure significant user base is there for the developer to sell to, through marketing strategies like cross subsidy( sell you cheap phone, and recoup in app purchases)
All this of course does not mean they have to charge 30% margin, but certainly the cost is not trivial.