Perhaps this miracle has something to add to these questions:
John 9:2-12
2 His disciples asked him, “Rabbi, who sinned, this man or his parents, that he was born blind?”
3 Jesus answered, "Neither this man nor his parents sinned; he was born blind so that God’s works might be revealed in him.
4 We must work the works of him who sent me while it is day; night is coming when no one can work.
5 As long as I am in the world, I am the light of the world."
6 When he had said this, he spat on the ground and made mud with the saliva and spread the mud on the man’s eyes,
7 saying to him, “Go, wash in the pool of Siloam” (which means Sent). Then he went and washed and came back able to see.
The imperfections and difficulties we see may be there to reveal God’s work. If everything were perfect, we would be less likely to see God’s work.
And here from Luke 13:
10 Now he was teaching in one of the synagogues on the sabbath.
11 And just then there appeared a woman with a spirit that had crippled her for eighteen years. She was bent over and was quite unable to stand up straight.
12 When Jesus saw her, he called her over and said, “Woman, you are set free from your ailment.”
13 When he laid his hands on her, immediately she stood up straight and began praising God.
14 But the leader of the synagogue, indignant because Jesus had cured on the sabbath, kept saying to the crowd, “There are six days on which work ought to be done; come on those days and be cured, and not on the sabbath day.”
15 But the Lord answered him and said, "You hypocrites! Does not each of you on the sabbath untie his ox or his donkey from the manger, and lead it away to give it water?
16 And ought not this woman, a daughter of Abraham whom Satan bound for eighteen long years, be set free from this bondage on the sabbath day?"
17 When he said this, all his opponents were put to shame; and the entire crowd was rejoicing at all the wonderful things that he was doing.
In this miracle God’s power is also revealed, and in this case Jesus mentions Satan.
So perhaps these passages support the views that sin is a cause of problems and problems are an opportunity for God to be revealed.