That's a very famous proverb indeed. It means that we can do many things with good intentions in mind, but the results turn out negatively different. And we can say then "Oh, i didn't mean it to sound that way", or "I didn't mean to steal for stealing, I have a sick mother and I had to save her"..But then, does stealing to save your mother a good enough excuse for a court? Hardly!
For the moment, I can't find a good example to illustrate this but I hope my idea's clear. Anyway, my intention was to explain

it's a good one, hein?