It is basically the expression based on how dogs are treated.

Working like a dog means "It's dog's life" (I think so).