It's up to you. That doesn't feel absolutely absurd to me. If you work with them, you're going to spend much more than 8 hours working... 8 hours is very small to judge people, but it will give them an idea of how clean and careful you can be.
Companies like Automattic would start with a 4-8 hours assignment, then if you do well, they would ask you to work part-time for them for 2 weeks.
Some companies won't ask you anything except to code for one hour over the phone...