I believe an employee can mark the file for that particular flight. It happened to me where my wife yelled out a gate agent and then afterwards on every flight on that trip we got our bags searched. Otherwise it happens sporadically as you'd expect.
Just conjecture, of course.