I think this was a joke, but I hope no one has ever made any assessment or decision of any sort on the basis of this quip (incidentally, not Einstein's[1]).
This, of course, is not the definition of insanity, nor is it a remotely good proxy. Doing things over and over again -- whether chopping at that tree or going to the gym or working on a difficult problem -- should absolutely yield different results. All actions accumulate, some more than others.
I always thought of the 'different result' as meaning improvement, and the action in repetition as being suboptimal. Thereby no matter how much you practice you will be at best improving sub-optimally.
This makes particular sense when you're practicing a musical instrument, bad habits will be more and more engraved as you repeat more. The best instrument players are those who have been taught or self-discovered good ways to improve, and put in the hard practice/repetition.
Why is that insanity? Is it because you expect that the future will be like the past and thus continuing to do the same thing that you've been doing will produce the same results?
Well, why do you think the future will be like the past?
Is it because, in the past, the future was always like the past, and thus by induction the future will continue to be like the past?
But why should you trust induction? Is it because in the past induction has been trustworthy and thus you expect it will continue to be trustworthy in the future?
Well, why do you expect the future to be like the past?
That definition of insantiy is worthless. Consider this:
You push the button once. Nothing happens. You push it again. Nothing happens. Does that mean nothing will happen in the future? No; that all depends upon what's going on when you push the button. Perhaps nothing that _you can observe_ happens.
FWIW, 'insanity' has many different definitions depending upon what kind of insanity you're talking about. There are different types of psychoses, schizophrenia, and sociopathic behavior as well.
"The definition of insanity is doing the same thing over and over and expecting different results."