How a .docx becomes a PDF here
A .docx file is really a ZIP archive containing XML that describes your document's structure — paragraphs, runs of styled text, tables, lists — plus the embedded images. The converter unpacks that archive, walks the structure, and rebuilds it as a PDF with real text objects rather than a picture of each page.
Because the text is genuine text, the resulting PDF is searchable, selectable and readable by screen readers. That is the main advantage over the common workaround of screenshotting pages or exporting to images.