They had a very successful economic mechanism design for many years. It's one that thousands of businesses have relied on for decades. Create great free product, create rich tutorials and docs, people look them up and you can sell variety of services from there.
Then ai companies stole the data, put a $20 pricetag on it and wiped out all those businesses essentially overnight.
If those "variety of services" are worth anything they should remain popular. There are countless ways to advertise them to people. I'm guessing many devs who were regularly browsing their documentation had ad blockers anyway.