Google doesn't make money from sending you to a link, it makes money from serving an ad that most closely matches what it thinks is the best answer to your query. ChatGPT just has a better algorithm at surfacing the answer (and therefore ads to show)