I heard supposedly the professor leaves the room and if you're caught cheating you're kicked out of West Point
I wasn't sure if this thread was a joke, but it doesn't seem to be, so here goes:
The honor code is at the very heart of West Point and is one of the most significant aspects of cadet life. Though an official academy institution [not exactly the right word], the code is administered by the Corps of Cadets themselves, though under the oversight of academy officials.
It is not merely about academics, either. A cadet can and will be dismissed from the academy for lying, cheating, or stealing, regardless of where or how [though there can be mitigating and/or extenuating circumstances which will be taken into consideration]. Even more challenging, is that the code does not permit a cadet to tolerate another cadet he has reason to believe lied, cheated, or stole. If he fails to report such an incident, he is in violation of the code himself, and subject to the same punishment.
Because of the code, yes, professors will leave the room during exams. In fact, cadets can come and go during exams and even chat in the hallway, so long as they do not discuss the exam. I remember one final I had, which allowed us to use any of the books we had been issued as part of the course. When I got to the final page of the exam, I realized that it required the use of a book I had forgotten to bring with me to the exam. I had plenty of time remaining, so I got up, told the professor in the hall that I was leaving to get my book (so that he would know that I was not finished and not to pick up my incomplete paper), and walked back to my barracks room. I chatted briefly with some friends, ate some cookies, and then returned with the book to the classroom to complete the exam. There was never any concern in the professor's mind that I would discuss the exam with someone outside of the classroom and he was certainly right that I would not.