The brain itself has no nerve endings that sense pain. That allows some patients to stay awake and answer questions during brain surgery.
The skin and other tissues around the brain still need pain control. As surgeons work, they can ask patients to speak or move. This helps them find areas important for those abilities.