By the time Harry came to Hogwarts, the curse on the DADA position had been there for a while, and these people had for some reason accepted the job (During the books, they accept the job for these reasons). Why did the professors accept the job if there had already been a curse for so many years?
I'm going to have a stab at this, although the answer will be formed of my understanding of opinions.
1) Teaching is rewarding: A normal teaching job sounds awful to many people, but really appealing and rewarding to lots of others.
2) Being a Hogwarts teacher is special: Being a Hogwarts teacher, I am sure (and I know some people question it) would be extra rewarding and feel very special. There is one major British school of magic (and we now know only three or so in all of Europe) and most of its staff have been there a long time and are good at their jobs. It has a thousand year history and basically every British witch or wizard went there. Even Voldemort loved the place! Even Filch stuck around despite being magic-free and surrounded by children who can do things he can't! Vacancies must be rare and those that are interested in a job there would surely have a low chance of getting one except in this job.
3) In some cases, Dumbledore has been persuasive: In the case of Moody and Slughorn, Dumbledore convinced them to join the staff (I know Slughorn joined in a different role but he was against coming back and Dumbledore convinced him). He could have been similarly persuasive to others.
4) Defense Against the Dark Arts is an appealing subject: Each teacher brought something different to the role, and there seems to be a varied curriculum which the teacher has a say in. It is usually practical and involves learning about strange creatures, combat and powerful, mysterious magic. We all know we would enjoy it if we were taught by Lupin or anyone else who knew what they were doing!
5) Accommodation and good food seems to be available as part of the job.
So, in summary, I think it would be a very appealing job in a very appealing establishment even if those that went before didn't stay long.