

Basically, each of these sites used open standards and APIs as a way to grow their service. Eventually once they got to the user base they wanted and beat out the competition, they could tighten the screws, lock things down, since the users didn’t have any place to go, they were locked in.
https://en.wikipedia.org/wiki/Enshittification
https://en.wikipedia.org/wiki/Embrace,_extend,_and_extinguish
In terms of specifics, it’s unclear if they were ever profitable before locking things down, since the main goal at that phase wasn’t making money, it was growing active users and killing competitors. I would have to imagine that with the locked down APIs, they are more profitable, and they never really cared about the community and good will, only when it was beneficial to grow their user base.
From the movie The Founder