If there is an experienced C++ developer around who is happy to answer questions, great. Otherwise you are stuck with having to figure it out by using trial and errors and Google-fu. If you post it to a forum, it could take a while for anyone to respond. If you post it to stackoverflow, very likely nobody wants to look at your horrible code (natural for a beginner, you know), and your question gets downvoted.
By contrast, ChatGPT can look at your code and explain very clearly what is wrong with it within seconds.
This is just one example. And it's not only for beginners. I have found that ChatGPT can answer high-level questions in programming very well. The alternative would be searching for the Internet and sift through all the noise to find the answers as well.
This is why reddit and twitter both locked down their APIs, due to the data being very high quality and immensely valuable for training.
Too bad they all did it too late, no one saw ChatGPT coming. And since all the data was already scraped from Stackoverflow, it no longer has any value for OpenAI. Stackoverflow is rapidly declining in volume, so future data from it is irrelevant.