The Pile and Common Crawl are where everyone gets their data from.
I did lie a bit; OpenAI does have private datasets. For example, GPT-3 was trained on Internet data, but InstructGPT/ChatGPT was further finetuned through their own dataset of question/answer pairs. This was augmented in a really clever way: the initial set of valid completions was written by humans, but then OpenAI made more AI models to augment their training data before finetuning GPT-3 on it.
Even then, there's techniques for taking the output of one large language model and using it to finetune another. So just having a publicly-available AI chatbot is enough to get it to generate a dataset that you can then train another AI chatbot on.
I personally have been scraping Wikimedia Commons for public-domain imagery to train an art generator bot on; but this is mostly because I want an art generator that isn't full of pending copyright infringement lawsuits.