The old and new testament do not align. There are many contradictions in the bible, especially between the old and new testaments. There are also many contradictions between the various versions of the bible.
And then we have individual interpretations and people using particular bible verses to try and prove that their personal agendas are the correct ones to believe. The right for gay people to marry is an example of one of these. The bible doesn't actually state that people of the same sex shouldn't marry, however people claim that it does.
People also use the bible to say that men shouldn't sleep with each other however the bible also says that people shouldn't eat certain types of meat on certain days, wear clothing of mixed materials, and that people shouldn't wear hats in certain ways or locations. And yet, we do all of these things quite willingly and openly.
So, the bible is just an outdated document that was written by man and therefore full of holes and errors. Take it for what it is.