We believe - and are on solid ground in believing so - that God the Holy Trinity of Father, Son, and Holy Spirit, are almighty God, all knowing and all loving. It follows that God who is almighty knows of every instance in which we suffer because of evil, or because we are tempted, or because we are tempted and, no longer resisting, fall into and succumb to sin. Our Roman Catholic, Eastern Catholic, and Orthodox Christian traditions all agree in teaching that evil, temptations, and sin only occur to the degree that God allows them to occur; for without his permitting them, none of these could befall us or come to pass.
Saint Ignatius of Loyola in this "14 Rules for the Discernment of Spirits" taught that God indeed does allow us to suffer in these three ways - evil, temptations, sin - for his good and kind purposes. Jesuits continue today to offer the teaching and guidance of their founder Saint Ignatius, and one way they do it is in terms of spiritual discernment and making good decisions.
Unless one is willing to have faith in God - to believe in the Father, Jesus the Son, and the Holy Spirit - to accept as true and totally reliable that nothing evil can come from God but only good; then there is no way out of the tortuous doubts that come to human beings in the throes of struggles with evil, disease, pain, death, violence, the sins of others, temptations, and our own sin. If God is evil or cannot be trusted to always be good or if there is no god; then we are on our own and we are lost.
In his Ninth (9th) Rule, Saint Ignatius teaches that the drama is not so much about the fact that there is evil (we can understand here in all of its forms including evil deeds, illness, human violence, and natural disasters, without exhausting the list), pain and suffering, temptations, and sin. Now, what is most dramatic and fraught with the gravest of consequences for us and for others, is not so much the evils or temptations or sins themselves, but rather our inner dispositions and reactions to all of these realities of life.
Saint Ignatius makes much of two opposite but related inner states within human beings: spiritual consolation and spiritual desolation, and he devotes several rules to explain how we are to understand what is truly happening within us in the face of these two states, how then we are to govern ourselves under these circumstances, and what that signifies for our life and the lives of others.
So it's not so much the fact of evil or violence but how we react to it, or the fact of being tempted, but how we conduct ourselves in the face of it, or the fact that God allows us to experience these things, but how we respond to the Lord and conduct ourselves in these situations.
To be more specific, when I suffer because of evil or am tempted or sin, if I trust in the Lord and welcome my trial, suffering, or humiliation; then I will certainly come to experience God's consoling love and mercy. However, if I am "tepid, slothful or negligent in (my) our spiritual exercises" (Rule 9) then it will be "through our faults (that) spiritual consolation withdraws from us." This is the first cause "for which we find ourselves desolate" (Rule 9) in the face of evil, suffering, temptation, or sin. God allows these experiences to "purify the intentions of our heart" so that we discover the degree of heat or cold in our faith and devotion to God.
The second cause "for which we find ourselves desolate" would be "to try us and see how much we are and how much we extend ourselves in His service and praise without so much payment of consolation and increased graces." (Rule 9) In other words, a second reason God allows us to experience trials, suffering, temptation, or sin and so find ourselves desolate, is so that we might discover the strength of our resolve to love God for his own sake without looking for "rewards", and, discovering how weak may be our resolve, decide to love God with purer intentions and with a more selfless heart. By this second scenario, God allows our trials to make us stronger in loving, praising, and serving Him and our fellow man and woman.
The third cause "for which we find ourselves desolate" would be "to give us true recognition and understanding so that we may interiorly feel that it is not ours to attain or maintain increased devotion, intense love, tears or any spiritual consolation, but that all is the gift and grace of God our Lord, and so that we may not build a nest in something belonging to another, raising our mind in some pride or vainglory, attributing to ourselves the devotion or the other parts of the spiritual consolation." (Rule 9)
So, first God allows us to be tested and suffer, to be tempted and even to sin; so that we may better know the true intentions of our heart, discover our lack of resolve to love, praise, and serve God and do something about it. Secondly, God allows us to endure these things in order to struggle, resist, and grow stronger. Thirdly, God allows us to endure these things in order to discover the great joy that all good things - including our own life, love, and growth - are God's gift and the result of his gifts. The antidote to pride is wholeheartedly giving all the glory and praise and thanks to God.