Earlier quoted context omitted.
The point of whiteboarding isn't to "build" correct/functional code - it's to get an idea of your thought process and how you go about solving a problem. It's not perfect (and there are both advantages and disadvantages to using a computer instead of a whiteboard) but when done correctly it gives a lot more useful insight than sitting there asking questions about their past the whole time.
Which would be perfectly valid if software developers spent their entire day solving problems on the whiteboard. But we don't.
I'll never forget how excited the lead dev was one day when he got some markers that would automatically make a digital file from whatever he drew on the white board.