It's not though. They expect shit to run afterwards. As someone who primarily writes Python (whitespace matters) in Vim (it's universal), having to code in Google Docs is a horrifying experience
No reasonable interviewer expects you to write perfect code on a whiteboard or in a non-IDE editor. I'm sure there are plenty of unreasonable interviewers, which is an indicator that you don't want to work for them.