They could have easily created pricing tiers which would have skimmed the maximum profit off each. Likewise they could embed ads in the API as a condition of access (even granting ad-free access for premium members).
For whatever reason they chose not to do these things. I'm leaning towards incompetence rather than malice.
Agreed they want to kill alternatives. I just think that done right they could make more money than now by not alienating part of the user base.