The Bible is not perfect: When it was first created, God was new to this whole "being all powerful creator of the universe" thing. So, he did what he thought to be best at the time in order to get humanity from surviving to thriving. This explains why his views on what food was clean and unclean changed from the old testament to the new testament, as originally unclean foods were just harder to cook and eat, as they were notorious for causing disease or other harmful problems. (e.g. the pig was hard to preserve, and had countless parasites)
This would also explain a handful of other things, such as why homosexality was banned. In earlier times, they needed more people, and in order to get more people, you need to have a male/female relationship that will produce children who will grow into adults. If it was a male/male or female/female bond, no children would be produced, which is bad for the population.
But noW that we have way more people on this planet, the population declining isn't much of a concern anymore. In fact, homosexuals are actually beneficial in multiple ways:
1. They are a form of natural population control
2. They are three to four times as likely to adopt children than heterosexual couples
3. Children who grow up with same sex parents are often more open minded and communicative
God can change his mind, and his word isn't something that's set in stone and never changed ever again.
In addition, the Bible has been translated hundreds of times, and handled by many greedy priests who would be willing to warp its writing to their benefit, so what we see today might not be the true word of God.