Apple does not make much money on iTunes. The total sum may sound like a lot but from each $0.99 song they give over $0.90 to the label. Apple's cost of running iTunes has to be a large fraction of the net income. The benefit to Apple is clear though. iTunes is one of the big reasons they dominate the portable media hardware market.
As a counter-example, it is also one of the reasons Microsoft's Zune struggles to capture share. Their original "Plays for Sure" media campaign was brilliant as a foil to iTunes. And then they crashed and burned when their own hardware devices would not support it!