You see, the Catholic church was (and is) a huge body, and a lot of different people had their interests represented in it. It was more like a unofficial government with a state religion that it used to create cohesion/unity, rather than just a religion. After the fall of the Roman Empire, I imagine that the more intellectual people in it realized that they were only body left with enough power to preserve anything of what was left, and wisely chose to do so. There was a lot going on in there that had nothing to do with religion directly.
And we know that the Catholic church has been mixed up with politics, the economy, ancient academia, and more. We do owe the Catholic church a lot of credit, but you can't just say that everything the Church did was solely inspired by their being Christian. The Church was largely influenced by Greco-Roman traditions in addition to (and in some ways, perhaps more than) it's central doctrine.