I don’t have experience working in a prison, but what you say makes more sense than, “Uh, that’s my ... lunch! Yeah,that’s the ticket ... .”
It’s no wonder there’s so much contraband in prisons if this is SOP. Anything coming in (especially) or going out should be inspected. Or at least elicited.
Tell that to the courts who have restricted the searches on people visiting convicts, as well as the inmates, and their living areas as well. You get searched more thoroughly by TSA before boarding a plane.
You would be absolutely amazed at what and how people attempt to smuggle contraband into a facility. Unfortunately, if you get a staff member to compromise themselves you could smuggle a Mack truck in, piece by piece. A Correctional Officer position usually doesn’t pay terribly well, or have a lot of respect, so it’s difficult getting honorable people to apply. When you do, they get discouraged at the idiocy of the bureaucracy involved. Females in a male facility are also subject the the pheremonal “love at fist sight” chemical attraction. You also have some people that suffer from the “short dick syndrome” where that badge takes over their common sense. A correctional environment is something that most “normal” people simply can’t understand.