I think the reason for this situation is the instinctive reaction of human beings. Although the brain cells are still active after entering the dream, the body is still frozen and unable to move. This is a self-protection mechanism of human beings to prevent people from unconsciously doing things that hurt themselves in their dreams. Waking up from a dream is similar to this situation, and it is also a manifestation of self-protection. When you are nervous and afraid in your dreams, you will inevitably be prepared and wake up.
In addition, people will inevitably reveal their inner thoughts when they are asleep, and they will inevitably think about it day after day and stay awake at night. If you are in a tense state at ordinary times, you will inevitably stay in this state in your sleep, and you will not be able to relax yourself, which will cause you to be awakened in your sleep! I am in a very nervous and uncomfortable state now, and waking up may get me out of trouble.
Finally, some people are awakened by illness because of inner tension. Some mental diseases may make people in a state of tension, and mental tension will become a conditioned reflex. Even after entering the dream, as long as there is a little mental stimulation, they will be nervous and wake up. It is necessary to go to the hospital to adjust treatment in time when you are sick, and it is necessary to do some psychological guidance often.