Jesus was a great moral philosopher who attracted a following because he stood up against the social order imposed by the Romans. The Sermon on the Mount is really a call for civil disobedience against the Romans. The theology of Jesus's teachings was basically borrowed from Judaism's belief in the Kingdom of God. Jesus's moral teachings were part of his call to repent before the coming of the Kingdom of God. If God is going to directly rule over human kind, it is a good idea to start doing good deeds and stop all the raping and killing.
After Jesus was crucified by the Romans, his followers wanted to keep his movement alive. They created the myth of Jesus's resurrection, virgin birth, etc. to basically shoe horn Jesus into Judaism's belief in a messiah while maintaining monotheism in contrast to the Roman's polytheism. As the early Christians were basically just an offshoot of Judaism, they needed to find a way to attract more followers. In Judaism, the concept of Heaven was a complicated belief in seven different levels where God and all the angels hung out. Then there is Paradise, which sort of a Jewish version of an afterlife, but complicated.
Christians saw an opening in the afterlife to attract Jews and Romans away from their theology (or lack thereof). Jews were very good at creating a bit of a members only club by requiring circumcision for men. That could really only be done at birth. Trying to do circumcision in adulthood during the mid Classical Era was horrifically painful and could lead to infection and death. So there was an opening to recruit followers.
Instead of a vague afterlife through the myth of Paradise, Christians decided that they would create their own members only club by requiring followers to accept Christ as their savior. In doing so, Christians were promised eternal life after death. And they threw in Heaven as a kicker. Then, to make sure any doubters or stragglers could be pulled in, they added the idea of Hell for those who did not accept Jesus. And to top it off, good Christians were obligated to spread the Gospel and convert as many souls to Christianity as they could in order to bring about the second coming of Christ.
To say that the belief system is all just clever marketing to try to make the Christian church dominate in society is not too far off. Between Islam, paganism of a number of different variations, Roman polytheism, Judaism and many offshoots and variations of the foregoing, there was a lot of competition to get people in to your Church, Synagogue, Mosque, Temple or whatever. The power of leading a religious group was second only to the emerging states and the receding power of the Roman empire. So, you could do really well for yourself if you got a lot of people to join your church and follow Christianity.