to ensure someone is alert and ready for anything
The surprise tests are meant to keep students on their toes.