The ad system uses a fairly small fraction of resources.
And before the LLM craze there was a constant focus on efficiency. Web search is (was?) amazingly efficient per query.