curl -v https://raw.githubusercontent.com/freenode/web-7.0/main/static/files/on-freenode.pdf 2>&1 | less
reveals:
content-type: application/octet-stream
The application/octet-stream is for "Any kind of binary data," suggesting the correct browser behavior would be to download. To inform the browser that the document is a viewable PDF, a web server normally sends an application/pdf MIME type. [1] The "raw" in the original link is why GitHub thinks the file should be treated as a generic binary.
While this may all seem much ado about nothing and pedantic, I often see this kind of behavior exploited in the wild to deliver malicious payloads. In this case I would say Firefox behaves "safer" than Chrome, but not not necessarily more correctly.