getPageSource attempts to retrieve the HTML as it was supplied by the server when the page was first visited. If the page then generates new HTML from JavaScript, it will not be part of the original HTML since it was not supplied by the server.
To view current, rendered HTML, use the DevTools Inspector: