Interesting. This topic has been on my mind lately from a thread I think a week or so ago (I don't recall which) and also an autoimmune condition that troubles me (which I will provide another motive at the end). For some reason when typing this I feel like I should probably write this more like an article on "gotquestions" but I'm a tad lazy, but perhaps this may be useful for you to look a little deeper. There are a few "categories" to consider regarding this subject about the why.
Directly from God
The product of a fallen world
Sin nature (human interaction)
"indirectly from God"
Firstly, we live in a fallen world in mortal bodies. Sin IS a disease and our bodies are mortal. I don't want to get too into that, but that is a main component to scripture. Death could be seen as a type of disease limited to this life and eternal death a permanent disease/decay.
~John 9:1-3 is a good verse for a basis of saying that even if disease is from the Lord (as a result of a fallen nature) still the "why" is different in each instance. This instance flew in the face of the commonly accepted view, that it was because of sin. Either that person's sin, or generational sin.
~Subhumanoidal brought up Job which is a good point also. We still don't have any answers on the real "why" of that circumstance. Growing up I understood it as a test and have applied that to my own life regarding afflictions, but it still doesn't explain the "why" and may not ever fully answer it in this life. It could be that I am biased toward looking at things like this and these circumstances are rather uncommon...not sure.
~We also have people dying from "seeming" plagues in the Old Testament (I could provide a list if you like).
There are over 40 instances of the word "pestilence" in the OT. The word appears to be plague but you'd have to read through each reference to be certain of the context.
Consider in 2 Samuel 24:15 when 70,000 people died due to David's error in taking a census.
Consider also:
The Lord gave Gehazi leprosy via Elisha. The Lord gave Miriam leprosy directly. Both were punitive.
~Was Naaman's sin mentioned regarding his leprosy? Not as far as I can tell.
In the NT the sin of the lepers was not mentioned, but that didn't mean that generational curses didn't exist necessarily but it is simply not said neither by Jesus or contextually (to my knowledge). I would appreciate it if someone could find a verse in the gospels that points out an affliction being sin based.
"some" afflictions may be demonic. You would do well to at least bear in mind the authority the enemy has on this earth without being under the protection and freedom of Jesus, but also to counter that with the fact that we are mortals in a fallen world. Sometimes a disease is man made. The motivation and coercion involved excepted, this has a unique factor in my own calculations regarding causation. I think far too often people jump to the demonic as a first resort and that needs a closer look.
~Regarding sin nature
Note: I am making a distinction between being in a fallen world and being mortal vs receiving the penalty for error.
STDs. They've been around since ancient times (anecdotal evidence). You'll have to do some "good" research as it
isn't as easy as a simple search to find the information but it is out there. This is a lengthy topic that has a few outliers (such as mother to child transmission) but other than a generational curse discussion these aren't relevant in general. Another important factor is that disease theory wasn't developed so while some probably believed it was spread sexually, it may not have been generally known. Syphilis has been around for quite some time. I have a lot of random information regarding this which is interesting (to me) in context to the discussion, but it's a lot for most readers.
A last area that I have time for currently is one of humanity and our ability to heal ourselves. It sort of lends itself to your question below
Does God give us disease to redirect our lives?
Not only disease, but MANY things. Trials, tribulation and suffering. I choose to see the Romans 8:28 as a primary focus for stuff like that. What I'm typing below isn't meant to make light of anyone's suffering but only that there are some things that need not trouble us if we simply do some problem solving. To prime it though...consider that poison ivy is preventable, but if you want to be out in nature it requires problem solving if the poison affects you.
I may add more tomorrow (I typed a block of text) but it's late now and I don't want to prematurely post certain conclusions. Essentially, sometimes we just need to learn more about our own bodies on our own. Each of us is uniquely and wonderfully made. There is a reason why drugs (medically) affect everyone differently, with some experiencing extremely rare side effects. Even down to our musical preferences no two are alike...that's a given for most, but what it does mean is that since the Lord knows me that intimately (being the creator) it could simply be a journey to discovery of how to navigate obstacles with him as your guiding light. Nothing is an accident and nothing is random in his eyes...It may not be for everyone, but what causes someone to realize a leading into the scientific field or to invent something? Sometimes it's just knowing it being of interest and not being satisfied with "we don't know" or "your results may vary" and that life is a process of discovery and there's nothing sinful in that. It's an adventure.
He knows why it does what it does. He wrote the code. It's possible that a very large percentage of it is beyond all of us, but there is some that we can know and learn to understand
All I know is I've been lazy regarding something that afflicts me and there are lot of things to try that are worth a shot and it may honestly be that sometimes it's a problem that can be solved that only you can solve for yourself within financial reason. I don't have thousands to put forward into technologies that would very likely help as a first resort.