Under Amazon's retail agreement, the publisher's set the book price that amazon paid. Amazon then set the price for customers - amazon had various prices for books, rather than a flat rate. Some were loss leaders - a common enough tactic in the retail world, big book chains do it all the time - but amazon's ebook division was profitable on its own merits - something a DOJ investigation confirmed. That's not dumping, and there were other competitors in the ebook space that were also profitable. If the publishers weren't happy with their margins - which were comparable to other retail models - they were fully entitled to go to amazon and negotiate new retail rates individually, just like they do with other book retailers.
Apple looked at that model, saw they weren't going to make their usual profit margin, and went to the big publishers. Apple said 'we'll let you set the final customer price, we'll take 30%, and an agreement that you won't let any other seller undercut us'. The publishers saw this is as a chance to raise prices and make more profit, and stitch up amazon at the same time. The publishers went to amazon all around the same time, and said, 'these are the new terms. Agree to them, or no more ebooks'. Given Amazon then was facing a choice between no ebooks at all, and the new terms, they rolled over.
Collusion to raise prices is illegal, for very good reason - it defeats the purpose of free markets, that of delivering the best product for the lowest price. And that was what they did. Higher prices across the board, more profit for apple and the big publishers, with no improvement to the product, through collusion. If the publishers wanted higher prices, they could have charged them to amazon individually; or set up their own book store with higher prices. And that would have been competition. But they chose not to compete in the marketplace, but arrange a back-room stitchup deal to raise prices for customers. And all the publishers have now settled with the DoJ for doing so.
Apple could have competed with Amazon; there was nothing stopping them setting their own prices, and making it so easy to use that people would use them instead even if they were more expensive for some books. Or offer other value-added services. Or shock, actually compete on price, it's not like apple was some startup tight on cash! They chose not to do any of that. And now they have to pay for the harm they did - which was artificially higher prices for books. They didn't increase competition; they made a deal with the publishers to lock in a higher profit margin for themselves and nobble their competitors at the same time. That's the exact opposite of competition.