The problem is google results get worse and worse due to SEO optimized websites and ads. On the other hand LLMs just answer your question without the need for you to waste time with that.
And you could just ask the LLM to only answer with the code...
And what makes you think commercial LLMs won't get SEO optimized and ad infested? Companys will fight the same way about getting their first mention in an LLM reply
At that point it's way more profitable for the LLM operator to just instruct the LLM to shill for (list of people buying ads from you), and charge the ad buyer per impression.