Imagine we had a society for a minute where we judged people, harshly and critically, based not upon their motivation (perceived or real) but upon their behavior. Good actions are judged positively. Bad actions, negatively.
Behind nearly every great evil in our society there was an individual, and a group behind him, who saw themselves as the good guys engaging only in awful misdeeds for the sake of a great society for everybody down the line. Their motivations noble, their actions despicable. Their great motivation never comes to pass, but the harm they did in pursuit of it certainly did.
And vice versa, Henry Ford radically improved the lives of his workers. In a time of a 6 day week with 10-12 hour days, he chose to adopt an 8 hour work day and 5 day work week. Why? After experimenting with it, he noticed it yielded greater productivity than the previous 10-12 hour, 6 day weeks. In other words because he did it because it made him [much] richer. He had a primarily selfish motivation, but in pursuit of it carried out actions that created a better life for countless others.
Of course when we look to the past, what I'm saying is hardly novel. Far more clever men said this much more succinctly than I ever could, "Don't look a gift horse in the mouth."