In Japanese folklore there is a yokai known as kamikiri mushi. It's a type of magical insect with razor-sharp hands and beak. They sneak into homes and cut off people's hair while they are sleeping. Some believe that kamikiri attacks are to prevent people unknowingly marrying a yokai. Often kitsune (fox yokai) take the form of a beautiful woman and try to trick people into marriage, which can lead to disaster. So in this case the kamikiri yokai is actually trying to be helpful by sending a warning to the possible victim.