Sorry to say but your PDFs were malware. In 20+ years I’ve never seen this on my Macs nor the literal thousands I’ve managed with various MDMs.
The Docker thing happened as described in my linked post. It happened with something else too, but again I can't remember. I wasn't planning on doing a post mortem so I guess I let the details slip!
In any case, I do like most of the OS' ways of doing things, including security. But it can be overzealous.
P.S. I'm not crazy! I'm not crazy!!!