Why the /view URL is the wrong link
When you call DriveApp.getFileById(id).getUrl() in Apps Script, you get back a URL that ends in /view. That URL opens Drive's file preview in a browser tab. For Docs, Sheets, and Slides that makes sense. For PDFs, CSVs, images, or any binary file, it is the wrong behavior: the recipient sees a preview pane with a download button, not an automatic download.
The actual download endpoint is https://drive.google.com/uc?export=download&id=FILE_ID. That URL tells Drive to serve the file as an attachment rather than render it. The first time I hit this, I spent longer than I'd like to admit trying to figure out why my emailed export links were opening a viewer instead of triggering a save dialog — the endpoint isn't surfaced in the DriveApp docs at all.