One needs to make a distinction between a record of an event and an endorsement of that same event. While the Bible certainly records murder, incest, and genocide, it nowhere endorses such things. Even in the account of the flood we are told that God was grieved over the action (which hardly constitutes an endorsement). As regards slavery, one may look to the New Testament to see that the practice is actually condemned in 1 Timothy 1:9-10. With respect to homosexuals, it ought to be noted that the crimes for which the death penalty is listed as punishment often did not result in that penalty being carried out. Apparently, there was a ransom that could be provided for one’s life, though this provision is forbidden in the case of a murderer (Numbers 35:31). One may, rather ironically perhaps, therefore look to hate crimes legislation as an analogue here. The point of such laws is not to criminalize the conduct proscribed, since the law already criminalizes such conduct via other laws. The intent behind such legislation, rather, is to set aside a special category of opprobrium for the crimes that fall within its scope. Thus it may well be that the intent of listing death as the punishment for various crimes was to heighten the sense of severity with regard to the crime, rather than to actually kill all those guilty of it.
You may also be interested in Does the Bible support slavery?
And Does God condone slavery in the Bible?