It was an ecosystem largely built on their land that they had opened up to the public themselves.
And WotC profited from that ecosystem at least as much as the ecosystem did their product. It's mutualism.
When they tried to reel back in some of the rights to their land, they obviously weren't expecting quite an upsurge in people asserting their squatters rights and giving them bad enough press that they would lose money if they were to reassert their rights to their land.
Sorry but no. They did not
try to reel back some of their rights, the draft that was leaked had some absolutely outrageous clauses by almost any measure. I mentioned it in another thread - but I would have understood them asking for a cut of profits for products built on their framework. I would not have agreed with it, but I would have understood. But the amount they asked was outrageous, the clauses concerning the copyrights of content built on the OGL was outrageous, them asking you to waive rights like a jury was outrageous, the clauses about allowing them to jump in any lawsuits over third party creators was outrageous.
WotC released their content under 1.0a which allows people to not only access it, but also use WotC's content in product that they are making money from themselves.
WotC releases their content under 1.0a, which following the SRD allows you to redistribute a small amount of their content and to make content yourself which reference some key components and concepts from the game. Paizo allows every rule, player option, feats of every single book they have released available online. The parts they don't allow are lore and arts if I recall.
Admittedly, these two things are different. But Pathfinder 2E also used the OGL and they also have a much bigger SRD. Having their content available for free is only the cherry on top.
Arguably it is 1.0a that is what allows Paizo to make money from selling their products based on D&D.
If there's one thing that came out of this whole OGL debacle, it is that this is arguable and nobody knows. It probably did at some point, but we don't know if it still does. WotC did not pull the trigger, it did not lead to lawsuits and so we have no idea. My absolutely unprofessional reading of the situation is that twenty years later, no Paizo does not need the OGL to make Pathfinder. We'll actually see that happen soon with new printings omitting it if I recall.
However Paizo have not released as much content under 1.0a, which means that other companies can't make money from content Paizo produced in the same way that Paizo is making money from WotC content.
What? Every single Pathfinder 2E and Starfinder books, which are much more numerous than 5E books, are under the OGL. And as mentioned, both SRDs are waaaay more permissive than 5E's.