Googlebot starts from pages it knows, follows every link it finds, and comes back at a rhythm set by how often the site changes and how much its servers can take. A page reachable only through a form, a script that runs after a click, or a link hidden to robots is rarely discovered. Internal links and a sitemap are how a site tells the crawler where its pages are.
Crawling also renders JavaScript, with a delay and a cost: a page whose text appears only after scripts run is read later and sometimes incompletely. Serving the text in the HTML itself is the safe choice, for search crawlers and even more for AI crawlers, several of which do not run scripts at all.