I am very familiar with this problem!
Also, controversially, I believe it is caused by AGILE DEVELOPMENT!
Think about it. Agile tries to drive devs faster by getting them to concentrate on completing what is asked for and move on to the next task. This is great, but it puts a huge pressure on the person writing the spec. If they miss something out it wont get done.
Usually the person writing the spec or tasks is a project manager who a: is not technical and b: hasn't been given anything more than 'I want a Webernet page! you have 3 months!'
They get around the problem of 'no spec' by hiring testers and telling them 'Just raise anything you don't like as a bug'
Again this is fine, because Agile is supposed to be iterative. Those bugs can go back in the queue as requirements and you just spin the dev wheel until everyone is happy.
BUT! that dosnt happen. What happens is the task is not accepted as done because bugs, the project is delayed indefinitely and the devs are blamed for either being slow or writing buggy code.
My personal fix for this (as a dev) is to ask for the test cases to be written first.
If you know what the tests are, you can test your code before you release it to test and it should pass 100% of the time. Happy Testers, happy Devs
If the test list seems short, the PM can see it right there and say 'Oh surely it should also do this?' Happy PM