Right now, in most places of the app we only download the files included in the file area (e.g. introfiles), but it's possible that the HTML content also includes embedded content belonging to external sites or to files that aren't in the module file area (e.g. TeX pictures). These files won't be downloaded when downloading the activity/section/course.
The function that can extract files from HTML content (extractDownloadableFilesFromHtml) is only used in a few cases (usually when we don't have the list of files), and it only downloads files that are hosted in the same site. This is different than what core-external-content does, this directive downloads all files when they are embedded (except if they are too large), the only case where we check if it's an internal file is for anchors (<a>).
We should review if we want to improve this to allow downloading external files and files that are in the HTML but not in the activity file area. Also, this function probably should be improved to allow downloading embedded PDFs (MOBILE-4173).