Dog's behavior is how they communicate. They don't have words like we do, so they make "words" with their bodies. Dogs hide discomfort well, so if you see any signs like stiffness, limping, slow to get up, etc.these are very important indicators of what is going on with your dog.
Many times when we have unwanted or undesireable behavior there is an underlying medical issue that could be pain related.