Never in my life have a coded on a whiteboard, so why on earth would I need to write compilable code on one to prove that I can write in an IDE or solve problems? It just doesn't make any sense; it's like asking a writer prove that they can set type in a Gutenberg press—why!? Sure, I can understand writing high level pseudocode on a whiteboard, but getting hung up on something like semicolons is literally pedantic and a power trip on the interviewer's side.
Also, when I was younger I was diagnosed with a condition called dysgraphia where my handwriting is terrible, which is why I got into typing when I was young and eventually programming. So writing legibly on a whiteboard is just an awful prospect for me as I need to think about how to write something just as much as what I'm writing.