To mean working hard?
Dogs just lie around and nap. That's not working hard...
Perhaps the expression could also have come from a comparison with a "manual worker".
I believe the term comes from herding dogs. I'm not a farmer, but from what I hear they work their little canine tails off to help with the herding.
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?