When the bible demonizes homosexuality, as well as the consumption of certain animals and whatnot, is it reasonable to assume that the Church was trying to demonize an enemy? Was the Church trying to warrant or justify war against someone?
Your question touches on several interrelated issues, but your question about the "Church" conflates a later historical concern with Jewish law and the writing of the Bible, both Old and New Testament.
The "Church" as we think of it today did not come into being as a coherent unit until the late 2nd century. The word for church in Greek is "ecclesia," which simply means "assembly" or "gathering." The earliest Christian worshippers did not have an institutional church, and although there was a common Christian identity, there was not standardization. Nor was there an organization that could attempt to enforce standardization until, in my opinion, Constantine's conversion and the Council of Nicaea (325 AD).
I am not an expert on the writing of the Old Testament, but I do know that many of the laws found in Leviticus and Deuteronomy (two books of the Old Testament containing prescriptions for what to do) are often concerned with maintaining the purity of the Jewish people. In Genesis, God promised Abraham that he would be the founder of a great nation, but in return, the Jewish people were expected to circumcise their male children. This was a sign that the Jews were God's chosen people. In the Leviticus canons against homosexuality, one of the concerns seems to be maintaining the ritual purity of the Jewish people. You can compare the prescriptions against homosexuality with prescriptions against associating with lepers, women's menstruation, and gentiles.
The transition from Judaism to Christianity is a complicated one, with the earliest followers of Jesus like James and Peter considering themselves to be a branch of Judaism (or at least they still followed the law). Jesus in Matthew 5:17-20 says that the Jewish law is not abolished and, "Whosoever therefore shall break one of these least commandments, and shall teach men so, he shall be called the least in the kingdom of heaven: but whosoever shall do and teach them, the same shall be called great in the kingdom of heaven." It seems that Jesus is upholding the Jewish law and the covenant Abraham made with God. The Apostle Paul, though, in Galatians and elsewhere writes that the law no longer needs to be followed for salvation and that faith alone will suffice.
I mention all this because the prescriptions about homosexuality and other items are included in the Christian scriptures because of their historical importance and because of Jesus' insistence on them. However, not all of the Jewish laws are followed of course (Christians in the Middle Ages didn't circumcise their boys).
When you add in the spread of Christianity in the 2nd, 3rd, and 4th centuries and the rise of asceticism, we see a new value placed on sex in society. In Genesis, as Adam and Eve fled the garden, they were commanded to be fruitful and multiply. In Judaism then, sex and procreation are commandments from God. However, Paul preaches that Jesus has freed humans from the need to have sex and produce more children because the kingdom of heaven will be coming soon (this was Jesus' main message). Paul writes in 1 Corinthians 7 that it is better to be abstinent, but if you are not called to be abstinent, then sex should happen inside marriage. With the rise of asceticism (the practice of self-denial of worldly pleasures), human sexuality becomes to be demonized, seen as permanently tainted by the sin of Adam and Eve. Augustine of Hippo articulates this idea the most clearly of any early Christian writer (see his Confessions and City of God). In the Christian worldview, sex is only for procreation and only permissible in the bonds of marriage.
This means that ANY non-procreative sex is forbidden. That includes any type of heterosexual sex in proscribed positions: doggy-style, woman on top, anal sex. Same-sex acts are included in this category. What makes them even worse is that same-sex activity is seen as pollutive. People who perform same-sex activities threaten the purity of the whole Christian community.
tl:dr
The institutional Church doesn't emerge until the 2nd/3rd century.
Homosexual acts were seen as pollutive in Jewish culture because the Jews needed to maintain their purity as God's chosen people.
Christians picked this up and said only sex in marriage for making babies.