I’ve often thought about this myself!
We frequently wonder why the worst sometimes comes to those who seem to deserve the best; why we sometimes get what we do not want; why many suffer who have not willfully caused suffering; why we frequently meet troubles and ills that we have not knowingly produced; why sickness, want and adversity in so many instances come to those who are living good lives and who are trying to do their best for everybody. And we also wonder in the face of these things if we actually produce our own troubles and if so, how; but if not, what the cause of our trouble might be. These are great questions, but the answer is simpler than one would suppose. Whether those who seem to deserve the best actually do deserve the best depends altogether upon how much of the real in their nature is in full accord with the seeming. In other words, are their invisible actions just as good as their visible actions seem to be? The visible actions are few compared with those that are not visible, and since it is the invisible actions of mind, thought, feeling, character and life that determine the real nature and the real destiny of man, we cannot accept as final any judgment of the case that is based solely upon appearance.
Like attracts like, and therefore what man is in the sum total of his nature will determine what is to come into his life and his sphere of existence. He therefore does not deserve the best unless he constantly is his best in every phase of his being. There are great numbers who seem to do their best on the surface, but who are the very opposite in the deeper realms of feeling, thought and subconscious action. Not that they do not mean well; the majority do mean well, but good intentions are not sufficient. Neither is it sufficient to be right in a moral sense. Those who live good moral lives, however, do not always live good mental lives, and the one is as necessary as the other.
~Christian D. Larson