After an impressive run (and by run we mean "massive killing spree"), Barabas finally dies, and we're left with Ferneze planning to ransom Calymath for the restitution of Malta and its citizens. The last line in play chock-full of total mayhem is Ferneze's: "let due praise be given / Neither to fate or fortune, but to heaven" (5.5.121-2).
Uh, wait, heaven? What's heaven got to do with anything? If this ending seemed kind of weird to you, that's because it is. Let's take a look back at some of Ferneze's other invocations of heavenly power and justice and see if it makes any more sense.
When making the original Money-Or-Conversion deal in the first act: "[on you] Who stand accursèd in the sight of heaven, / These taxes and afflictions are befall'n" (1.2.64-65). It's pretty clear that God isn't the one taxing the Jews, though; Ferneze's just using the Christian contempt of Jews to wrangle some money out of them.
When Barabas, apparently dead, is brought before Ferneze in Act 5, Ferneze explains his sudden death to Bosco by saying, "Wonder not at it, sir. The heavens are just." (5.1.55). Again, though, God hasn't killed Barabas—actually, nobody has; it's just a part of Barabas's own plot to save his own skin.
By the time you get to Ferneze's proclamation that heaven is responsible for all the good stuff, you've probably noticed something important: God? Not a character in this play.
Know who is? Machiavel. The things that happen in this play are moved by people acting out of their own self-interest, not by spiritual forces. The play's last line seals the deal.It's the mixing of Barabas's plots with Ferneze's cleverness that brings about the play's end, not heaven.