In Revelations:Visions, Prophecy, & Politics in the Book of Revelation, Elaine Pagels clearly lays out a historical argument about how a contested text made it into the New Testament at all and why it has remained simultaneously controversial and wildly popular up until the present. Below is a summary of her conclusions.
The author of Revelation, John of Patmos, was likely a Jewish refugee of Judea writing around 90 C.E. after Jerusalem was sacked by the Romans around 70 C.E. and was profoundly affected by the destruction of the Temple. According to Pagels,
What John did in the Book of Revelation...was create anti-Roman propaganda that drew its imagery from Israel's prophetic traditions... [emphasis in original] (16).
The book was a piece of wartime literature, a revenge fantasy, and a cry for justice. It is a work of theodicy and clearly claims that good will prevail over evil in the end. To avoid Roman retribution, John wrote cautiously and cryptically. The highly symbolic nature of the text proved important for its ultimate survival.
John* was neither an orthodox Christian nor a traditional Jew, a second generation follower of Jesus, a movement on the verge of becoming a religion proper. John wrote during a time of theological crisis among those adherents to the early movement over the delay in what Jesus insisted was the imminent coming of God's kingdom. Compounding this, there was also a political crisis after Caesar's assassination, resulting in an explosion in the imperial cult. At a time when the Roman Empire was desperately enforcing social cohesion, the fledgling Christian religion was decidedly anti-social in that it embraced the socially marginal (e.g. women, children, the poor, etc.), challenged traditional familial structure and power, and prohibited participation in the imperial cult, the public ritual affirmation of the Roman political system.
The social forces that pressed cultural accommodation by the early Christians helped to elevate Revelation. In the book, John argued for the centrality of prophetic (cf. charismatic) authority and was against those who argued for apostolic (cf. bureaucratic) authority, though John's version of authority would ultimately lose. For John, though, at this time, the evil in his revelation is not just Rome but also the heterodox and heretics, contemporary Christians, groups that likely included Paul of Tarsus and the growing ranks of gentile converts, all of whom he disagreed with.
Revelation only just squeaks into the Bible, though. After John's death, Irenaeus co-opts Revelation, using the book to insist on both right (or moral) action (i.e. works or deeds) and right belief (i.e. orthodox faith), "right belief" being support of apostolic (cf. bureaucratic) authority. The end of Christian persecutions (though these had always been rare, brief, and localized) came to an end in the fourth century in Rome, which created another crisis for readers of Revelation who expected all-out war and not patronage from the Roman state. The book could then be turned against anyone with whom the reader disagreed, notably in the fourth century independent monastic communities. Anthanasius, continuing Irenaeus' work to further the apostolic model of church authority, includes Revelation in the first authoritative list of permissible books for orthodox Christians (i.e. the canon), and while none of Anthanasius' contemporaries included Revelation on their lists, it is Anthanasius' canon that prevailed.
Pagels writes that
...John's apocalyptic visions helped create coherence among all who identified as Catholic [i.e. universal, or orthodox] Christians and to establish a common bulwark against all whom they saw as outsiders. Ever since, Christians have adapted his visions to changing times, reading their own social, political, and religious conflict into the cosmic war he so powerfully evokes (173),
Because John offers his Revelation in the language of dreams and nightmares, language that is "multivalent," countless people for thousands of years have been able to see their own conflicts, fears, and hopes reflected in his prophecies. ...[M]any readers have found reassurance in his conviction that there is meaning in history--even when he does not exactly what that meaning is--and that there is hope [emphasis in original] (34).
Pagels' analysis is quite sociological, and though she does not use this Weberian language herself, she essentially makes an argument that explains the institutionalization of Revelation through the struggles between charismatic and bureaucratic authorities in the early Church and its historical popular appeal through its promise of victory for the just and the malleability of its definition of evil. As a sociologist, I found Pagels treatment of gender, class, and more broadly, social marginality and their foundational roles in the social significance and endurance of Revelation wanting. This likely could be its own book-length treatment, however. The book, built on several previously published journal articles, would work well in undergraduate classes on the sociology of religion or religious history. Graduate students would likely benefit more from reading the original journal articles directly. Overall, this a great work that deserves a place in the sociology of religion.
* - Contrary to popular belief, the evidence is strongly against authorship by John the Apostle, presumed author of the Gospel of John, even though several of the early Church Fathers conflated the two men and their writings for strategic reasons.