I have been doing this task for “Donkey Years” What does it mean and what had it do with a donkey?

A donkey is considered to be a Hardworking animal. He is talked in stories as an animal that can do a task over and over again. He can carry a heavy load and cannot do anything that requires a brain. So, in a way, he is an animal who works hard but is not too intelligent.

So, When someone has been doing a task for many years, he says I have been doing it for donkey years. It also shows that since he has been doing the task for such a long time, he knows it very well. When you do a task many times, does it required much intelligence? No right? So, that’s why the comparison to a donkey.