They wouldn't see it until they opened it, so clearly they didn't open it because of the book. And if they need to open your suitcase (not because of the book), they have a reason for that.
I was chosen "randomly" for secondary inspection. This was after a failed bombing plot and the TSA implied a lack of Christianity was the proximate cause of the attempted attack.
After. But then I continued to get selected for additional screening on the rest of the legs of that trip and the return. So either I was going to get searched every time I got on a plane already, or they flagged me for additional scrutiny after the initial search.
Probably just bad luck. TSA seems to have designated targets for abuse. My wife is one of them. Every time we travel, she consistently gets selected for secondary screening while I breeze on through. There is not a single thing about her which even a fanatically committed conspiracy theorist could spin as a justification, but it has been going on for years. She has a good sense of humor and the agents treat her well enough, but having your stuff rummaged through every time you go through security is grating.
Even paying for PreCheck doesn't get her off the hook. You'd think it would help, but no.