That can't be true, Google Books was 15 years prior to the advent of large language models. Until 2020 nobody could train on such a large collection.
I think Google initially wanted to augment the web results with a large book collection to get "all the world information and make it searchable", same with Google News.