Bartleby (Affleck) and Loki (Damon) are fallen angels, banished for eternity from Heaven to Wisconsin for insubordination after an inebriated Loki (with Bartleby's encouragement) resigned as the Angel of Death. A newspaper article arrives by mail, in an envelope with no return address: The trendy Cardinal Glick (Carlin) has announced that he is rededicating his cathedral in Red Bank, New Jersey in the image of the "Buddy Christ". Anyone entering the cathedral during the rededication festivities will receive a plenary indulgence; all punishment for sin will be remitted, permitting direct entry into Heaven. They receive encouragement from an unexpected source: Azrael (Lee), a demon, once a Muse, also banished from Heaven (for refusing to take sides in the battle between God and Lucifer); and the Stygian Triplets (Barret Hackney, Jared Pfennigwerth, and Kitao Sakurai), three teenage hoodlums who serve Azrael in Hell.
Bethany Sloane (Fiorentino)—a depressed, infertile, divorced abortion clinic employee—attends a service at her church in Illinois. Donations are being solicited to help a hospitalized, comatose homeless man—known only as John Doe Jersey (Cort)—who was beaten senseless outside a skee ball arcade in New Jersey by the Triplets. Later that day, Metatron (Rickman)—the Voice of God—appears to Bethany in a pillar of fire and declares that she is the last relative of Jesus Christ. He explains that Bartleby and Loki cannot be allowed to succeed: By re-entering Heaven, they would be overruling the word of God, thereby disproving the fundamental concept of God's omnipotence, and nullifying all of existence. She, together with two prophets who will appear to her, must stop the angels and save the universe.
Now a target, Bethany is attacked by the Triplets, and is rescued by the two foretold prophets—drug-dealing stoners named Jay and Silent Bob (Mewes and Smith). Azrael then summons a Golgothan (a vile creature made of human excrement) to find and kill Bethany, but Silent Bob immobilizes it with aerosol deodorant. Other allies in Bethany's mission are Rufus (Rock), the thirteenth apostle (never mentioned in the Bible, he says, because he is black), and Serendipity (Hayek), the fickle Muse of creative inspiration, now working in a strip club in search of inspiration of her own.
On a train to New Jersey, a drunken Bethany reveals her mission to Bartleby, who tries to kill her; a melee ensues, and Silent Bob throws the angels off the train. Bartleby and Loki now realize the potential consequences of their scheme; and while Loki wants no part of destroying all existence, Bartleby remains angry at God for his expulsion—and for granting free will to humans while demanding servitude of angels—and to Loki's horror, resolves to proceed.
Bethany and her allies discuss the situation: Who told the angels about Glick's plenary indulgence in the first place, and why has God not intervened? Metatron explains that God's whereabouts are unknown; he disappeared while visiting New Jersey in human form to play skee ball. At the cathedral, the group attempts in vain to persuade Cardinal Glick to cancel the celebration; Jay angrily steals Glick's golf club.
At a nearby bar, Azrael captures Bethany and her protectors and reveals that he sent the anonymous news clipping to the angels—he would rather not exist at all than spend eternity in Hell. Silent Bob kills Azrael with Glick's blessed golf club. Serendipity tells Bethany to bless the bar sink, turning its contents to holy water, and Jay, Rufus and Serendipity drown the Triplets in it. Bartleby and Loki reach the cathedral; Bartleby kills all the celebrants, and when Loki attempts to stop him he tears off Loki's wings, making him mortal. When the protectors block Bartleby's entry into the church, Bartleby kills Loki and fights off Rufus, Serendipity and Bob, but as he flees, Jay shoots off his wings with a machine gun.
During his latest of several attempts to seduce Bethany, Jay mentions John Doe Jersey. Realizing that the homeless man is the mortal form that God assumed, Bethany and Bob race to the hospital. Bethany disconnects John Doe's life support, liberating God, but killing herself. As Bartleby again attempts to enter the cathedral, God manifests before him as a woman (Morissette), and kills him with the power of her voice. When Bob arrives with Bethany's lifeless body, God resurrects her and conceives a child within her womb. God, Metatron, Rufus, and Serendipity return to Heaven, leaving Bethany and the two prophets to reflect on what has happened.

Question: Why do Bartleby and Loki want to go to the cathedral?
Answer: A ceremony is being performed that will forgive the sins of all who enter, and they will be able to get back into Heaven.
Alternative answer: to kill Bethany