How immortal beings such as Jacob or the smoke monster (MIB/Flocke) could have become moral (an apparent requirement in order to "leave" the island existence) is unknown.
But here is a new theory I thought may explain it. It merges a couple of given facts such as the Numbers and Jacob's authority over the island.
MIB was locked on the island's time and space. It could not escape. Jacob was the island guardian, which also could be called a jailor. Jailor's have the keys to the prisoner's cells. Jacob could be considered a jailor to MIB.
The importance of Jacob's numbering system should not be underestimated. It went through the entire series. It was the ultimate clue. Yes, it represented the candidates, but it had to represent more than that because there were more than one hundred prior candidates who did not achieve what either Jacob or MIB desired: escape. One would hope that the candidate numbers would have more meaning than just being numbers.
The numbered candidates could symbolically represent parts of a lock's tumblers, the pieces of metal that move when the proper key is inserted to open the mechanism. Now, if Jacob numbers his candidates, it is either Jacob or the island automatically sets the island's "locking mechanism." The island itself was described as a Magic Box. Magic Boxes would need to be secured from devious people. When the candidates arrive at the island, it is their destiny to "open" the lock in order for Jacob and/or MIB to escape.
The random order of the candidates selection to become island keys came from Jacob scouting them as children, then coming to them with his touch (marking them as elements of the island key). Once they arrived on the island, the game was to determine the order of the candidates in order to unlock the island. It would seem neither Jacob or MIB could control the order of the key, because they were frustrated by the lack of results over the centuries of people being brought to the island.
The only logical progression for the key cuts would be the order of when each candidate died. We know the order from the beginning: Locke (which could be considered a clue for this theory), then Sayid (even after reanimation), Jin, Jack, then most likely Sawyer (if the Ajira plane did not have enough fuel to get home) and then Hurley (who would have become immortal when he accepted the island guardianship).
One might realize a flaw in the theory which is that Jacob and MIB "died" (i.e. escaped) before Hurley would have died. But they could have been trapped like Michael as a whisper, a spirit attached to the island, until Hurley died which would release all the lost and trapped souls into the after life.