This article is pretty interesting. It describes some Babylonian ideas about disease. They were good at describing symptoms, but had to resort to superstition in ascribing causes.
The Bible obviously was caught up in the same dilemma. The writers did not receive supernatural information about the brain or germs. They didn’t know about the role of either related to symptoms. They did know about some physical causes, like snake bites and blunt force trauma. But they did not know about more invisible and complex causes. So they speculated based on a world-view similar to that of the Babylonians.