In an exam, a student was caught cheating, and the teacher told him: If you don't want to get caught, don't do anything stupid.
People who are caught doing stupid things often have bad luck is different from the above conclusions.