We learn from Paul's first letter to Timothy that he, Timothy, had "frequent illnesses" (1 Timothy 5:23). The text hints that Timothy had some stomach problems and Paul recommended that his protege drink wine and not water only. Apparently contaminated water was part of the problem or, at least, would exacerbate Timothy's condition. Beyond that, we don't know much about what troubled him.
Paul was used often and powerfully to bring healing to others. His relationship to Timothy was close and Paul refers to him as his spiritual son (2 Timothy 1:2). We can guess that he prayed for Timothy to be healed. To what extent Timothy received healing, we don't know. We know that Timothy was left with the challenge of frequent illnesses.
We might also be puzzled by Paul's admission to Timothy that he, Paul, "left Trophimus sick in Miletus (2 Timothy 4:20). Again, it would be likely that Paul prayed for Trophimus, a fellow follower of Christ and co-laborer with Paul. Trophimus' sickness remained.
You may think that I'm trying to make a case that it is not always God's will to heal. I actually believe that it is God's will to heal. I see God's will most clearly demonstrated in and through the Person, life, teaching and ministry of Jesus. These things alone convince me that God wants to heal. In the New Testament, healing is bound together with Gospel proclamation.
Paul doesn't feel the need to comment on the "why" of either Timothy or Trophimus' conditions.
The reality is that God's will does not always materialize and when that is our reality, we must learn to carry on the best we can. Timothy was very useful to God and he was entrusted, by Paul, with a great deal of responsibility.
How might you and I, living with undesirable conditions, carry on?