This is a fantastic idea, as the exam becomes part of the teaching - if you sit there for 5 hours wishing you prepared your study better, that's an invaluable lesson.
I suspect the reason why it does not occur more commonly is simply because of the costs of running such a long exam.
A better lesson than if you sat there for 2 hours wishing you had studied?