The reason the publishers demanded the agency model was because
Amazon was undercutting everyone else. To monopolize the market,
Amazon would sell books below costs. Their plan was to run everyone else out of business, to be honest. You do not see Barnes and Noble, or any other bookstore in very good shape right now.
Amazon has cut them off at the knees. Once they had the publishers having to deal with
Amazon for the vast majority of sales,
Amazon could dictate what price the publishers sold books to them. There are laws against this practice in some states, because it is unfair commerce.
The problem is that the publishers have been making obscene profits off books for so long that they do not want to lose their money.
Amazon was making things where the publishers would have to bow to them to sell books. So one dictatorship was replacing another. Apple's compact was a compromise that allowed a consistent book pricing without giving one vendor absolute control.