A few years ago I injured my knee. I attempted to continue my work out but I quickly learned that the human body will only allow you to go so far until it sends you a clear message to continue would be damaging.
Because of this I went to all my classes but could not participate in the running, and did NOT increase the intensity of many of my exercises. As a result I had put on a couple of pounds because I had not altered my eating. I am very in tune with my body so I could feel a significant difference in the way it felt.
I continued to work out while healing my knee both physically and mentally. I increased the intensity of every exercise both mentally and physically. I was very aware of my food choices. And as a result maintain a very healthy physical body.
From this incident I learned a few things. First, it was good subconsciously to keep going to the gym. It continued my habitual ritual. Second, when you are really hurting best to not push it as you will heal faster by caring for the injury. And last,it isn't just doing an exercise that counts but what you put behind it.
Like anything in life, the amount of effort you put into something is a clear indication of the amount of results you will achieve. Just "going through the motions" will not warrant the same results as lets say someone who really gives it their all. Either way, the same amount of time passes--so you might as well get the most out of your minutes.