Actual causes of the afflictions
From the book: The Gospel according to the Spirititism - Allan Kardec

"Blessed are those who mourn, for they shall be comforted. Blessed are those who hunger and thirst for righteousness, for they shall be satisfied. Blessed are those who suffer persecution for righteousness' sake, for theirs is the kingdom of heaven." (San Mateo, 5:5, 6 y 10.)
The vicissitudes of life are of two kinds, or, if one prefers, they have two very different origins which should be distinguished. Some have their cause in the present life; others have their cause outside this life. If we go back to the origin of earthly evils, it will be recognised that many of them are a natural consequence of the character and conduct of those who suffer from them.
How many men fall through their own fault! How many are victims of their lack of foresight, their pride and their ambition! How many end up in ruin for lack of order, lack of perseverance, because they lack conduct or because they did not know how to put a limit to their desires!
How many unhappy unions, because they are the fruit of a calculation of interests or vanity, and in which the heart has not participated in any way! How many dissensions and disastrous quarrels could have been avoided with more moderation and less susceptibility!
How many ailments and diseases are the result of intemperance and excesses of all kinds! How many parents are unhappy because of their children, because they did not fight evil tendencies in them from the beginning! Through weakness or indifference they have allowed the germs of pride, selfishness, and clumsy vanity, which make the heart insensitive, to develop in them. Then, later on, when they reap what they have sown, they are surprised and lament the disrespect and ingratitude of their children.
All those whose hearts have been wounded by the vicissitudes and disappointments of life, question their consciences calmly; go back step by step to the origin of the evils that afflict them, and they will find that most of the time they can say: If I had done or if I had not done such and such a thing, I would not be in this situation.
Whom, then, should we hold responsible for all these afflictions, if not ourselves? Man is, therefore, in a great number of cases, the architect of his own misfortunes. Yet, instead of acknowledging it, he finds it easier and less humiliating to his vanity to blame it on luck, on Providence, on lack of opportunity, on his bad star, when in reality his bad star lies in his own negligence.
Evils of this nature certainly make a significant contribution to the vicissitudes of life. Man will avoid them when he works for his moral betterment as much as he works for his intellectual betterment.