The more appropriate analogy here is that you started collecting ingredients from people in your community (for free), letting other people bake them in your ovens, and then giving the cookies out for free to anyone that asked. You made profits by selling data collected about cookie preferences and displaying ads to your cookie makers - so also not quite "for free". Some people decided to start packaging these cookies and providing a better end-user experience with the cookies, and charged a reasonable fee for this experience. They also provide enhancements that make it easier for your bakers to actually bake the cookies. You fully knew about this. You worked with them to improve integration between your process and their processes. You continued to accept donations from the community in terms of people making cookies and also providing ingredients. You simply provide the ovens and foot the electricity/gas bill. You then say you will continue taking things for free from the community, will continue to monetize their labor, but you will start charging the folks repackaging an exorbitant amount of money because you are trying to get your cookie business bought by a larger organization and can't have people providing a better end-user experience (otherwise you would charge a more reasonable rate if it was really just about lost ad revenue).
You still expect the people donating ingredients (posters and commentors) and bakers (moderators) to continue working to generate you money while removing tools that make their jobs easier. You also can't understand why the community is upset that your tacit agreement to freely use their stuff to make you money while allowing them to freely access their cookies in whatever form they choose has been tossed out of the window on a whim, because they need to squeak out a little bit more money.
No one is saying this behavior is illegal. It also extends well past Apollo, to other third party apps and integrations. Moderator toolbox is a huge one that may not be able to exist after the end of the month. There is a reason massive subreddits are shutting down, some indefinitely. Folks that think only Apollo's user base are the ones impacted, so it will be a negligible impact on Reddit overall aren't fully aware of the entire situation. Mod functions are next to useless on the first party app, and mod toolbox makes moderating much easier in a desktop browser. Third-party apps filled a massive void here, and is a huge reason for much of the discontent. Reddit taking away the tools to curate the content (for free) the community provides them (for free) isn't exactly the smartest idea.
It's a little like tacitly consenting to someone helping sell your cookies for years, asking nothing in return, then suddenly demanding that they pay you twenty million dollars for the next batch, and they have 30 days to figure out how to do that. There is a much more reasonable way to change the terms, but that approach would be essentially cutting off the cookie distributor.
Reddit has every right to monetize their API if they choose to do that. This wasn't about monetization, it was about cutting out third party apps.