Off course it is common courtesy for them to ask if you could spare some time for the exercise especially that it was not indicated you've have to do one earlier in the process. It would raise some eyebrows with me and definitely count as a negative when evaluating options (for the reasons others have mentioned).
Looking past that though, it depends on how much you want the job. I've had this happen to me a couple of times and I replied right away indicating I'd not be able to make the deadline but offered a new time instead.
If the task is vague or you aren't sure how long you'll need - do ask if there's a timeframe in which they expect the exercise to be done (reasoning below).
Thank you for the exercise. I look forward to the challenge. I reckon I will need 3 hours to complete it however I am caught up with some blah-blah-blah today and will not find good time in which to work on it. Do you mind if I completed it and came back to you on Friday instead?
I notice there isn't a mention of how much time should be spent on the exercise - please could you give me an indication?
This is kind of important to do and in itself shows them how you can manage expectations amongst a busy schedule, be open in your communications, etc. Usually they understand and appreciate the pragmatism. If they find this unacceptable, then yes you really ought to reconsider working for them.
For the reason behind deadlines like this - It's often the case with homework exercises they don't want you to spend more than an allocated time and hence the short notice. i.e. If you took the weekend to complete what should be a 2 hour exercise, sure you're going to come up with something quite polished that does not accurately represent your skills and abilities - especially against other candidates do only take 2 hours and Hiring managers need to make decisions with this constraint as a factor. This is even more reason to indicate upfront that you need a block of time. Here I would make use of Github or similar that shows the timeline of all the your work on the exercise (as well as how you branch, commit, test, refactor, etc, etc). You could point this out to the interviewer.
It sounds as though you've missed the deadline now so perhaps do something similar in retrospect?
I really do apologize. I thought I would have had some quality time to focus on the exercise but due to unforeseen blah-blah-blah I found I couldn't complete it on time. I've included a link to the github project showing the approach and how much time I took, etc - I hope this suffices in this form. I look forward to your feedback.