Don't write a demo for an interview if you can avoid it; submit existing code or projects if you can.
Demos and code samples are important for a lot of reasons (which vary by reviewer), but mostly they are about showing potential employers the kind of code you write in the wild and the kind of problems you are interested in solving. They also help demonstrate your level of interest in the craft of software development.
It's much better to submit some code you've already written for a previous project or game you've written that you are proud of, or that demonstrates a clever solution to a problem -- anything that is interesting or difficult or that can serve as the basis for a good discussion.
Writing code explicitly to submit as sample code tends to come across as contrived and fake; it can be surprisingly easy to tell, for example, that a programmer thought that a potential employer would want to see "well documented" code and thus put really detailed comments on everything, striving for what they believe to be perfection. Real code isn't perfect, it has warts and rough edges, and when you write code explicitly for demo submission you tend to polish it so much that it becomes obvious you didn't write this because you loved the writing of it. You just wanted a job.
That said, if you don't have any work you can submit -- either because you haven't written any yet or because your previous job prevents you from submitting any of the code (under NDA) -- you don't have a lot of options but to write something new. In that scenario I would encourage you to focus on writing the thing for its own sake, and forget about what employers "want." Write a game because you want to write a game. Write a cool tech demo because you want to explore that tech, because that's what you are interested in.
- How important is code modularity?
- How important is to showcase a typical algorithm implementation?
- How important is to include novel features?
- How important is playability?
- Should I privilege code readability or code optimisation?
- How important is code documentation?
The answers to all these smaller questions are, unfortunately, "it depends" (except for the readability thing -- I think you should favor readability in general, especially for "demo code"). Some employers may want to see you reimplementing quicksort. Others may not care. Others will just ask you to reimplement quicksort on a whiteboard at the interview anyhow.
Don't focus on what you think employers want, because different employers and even different people who may review your code will want different things. Focus instead on what you want to showcase about yourself, because you have far more control over that and it will benefit you more in the long run.