Earlier quoted context omitted.
Sodomy and fornication were illegal and prosecuted, mostly because they spread disease.
No, mate. It's illegal because bible. Those are justifications. For example, you are far less likely to transmitted diseases by sucking cock, but under sodomy laws, it's a crime.
Case in point, sodomy and fornication may have been considered wrong because they spread of diseases. Many of the diseases we can treat easily today were probably debilitating and fatal back then, and they imposed a cost that society then could not bear.
Another example, adultery: most of the animal kingdom has no concept of marriage, but a desperately poor society may not be able to tolerate any bad blood brewed by adultery. When your primary resources are the productive youth of your society, you'd prefer them to be united in their toils (be it farming hunting of wars) rather than killing each other over petty jealousies.
Some parts of Islam seem overly brutal to us, but (AFAIK) it was forged in a society that mostly lived an unbelievably harsh tribal life in the desert. Consider theft in that context. Even a minor theft could cause somebody to lose their life, and hence thievery in general was deterred with very harsh punishment.
Sure, some rules were made purely for the benefit of a select few, but that doesn't affect the point that many others were reasonable for their time.
The problem with religion is that people still assume these rules as God's (with a capital 'G') own truth when they no longer make any sense in the modern day.