I don't buy the idea that SOX prevents 'loss leaders.'
Who said it did?
If XCode can't be 'given away' then I would say that SOX is preventing loss leaders, because that is essentially what XCode is. They are giving away the developer tools in an effort to attract developers to their platform. At the most basic level, it's not much different than advertising 'free after rebate' items in order to attract customers into your store.
But they did't give it away. It was part of the Mac people paid for. They are perfectly entitled to give stuff away. What they can't do is retroactively claim that part of what they sold you before was free.
Obviously this seems like a Byzantine regulation, but it's not aimed at Apple - it's intended to stop certain kinds of fraud involving counting money received as revenue even though there is still a lot to deliver.
As for 'it's about greed' - well they do make a lot of money and that leads people to accuse them of greed. It's just a subjective judgement.