This isn't about security, it's about making sure that a text document is formatted exactly the same on all devices, whether it's a PC, a phone or a printer.
The PDF file is reliable in that aspect while other widely used document formats like .doc and .docx are basically a gamble, even if you open the document on the same machine with the same software. The same with presentations: You just need to open the file in a slightly different software or version or encounter one of the countless bugs and suddenly you have a picture overlapping with text.
PDF gives you all the tools to make sure that doesn't happen. No one prevents you from shooting yourself in the foot by writing a bad PDF that doesn't adhere to common good practices. For example it is technically possible to make a PDF with text without embedding fonts. Doing that is a bad idea.
By your argument, any programming language, no much how safe it purports to be, fails because they allow you to write bugs.