All without manufacturing logistics and hardware production costs. Obviously the computing infrastructure, payment processing and software engineering of the app store has a cost, but I'd imagine much less than those involved with building, distributing and selling a computer or mobile device.
It may not generate as much as hardware sales do, but billions of dollars hardly seems like spare change.
[1] http://www.apple.com/pr/library/2015/01/08App-Store-Rings-in...