Mr. Hooper gives Elizabeth two reasons to stay by his side. First, he says, "'[...] hereafter there shall be no veil over my face, no darkness between our souls! It is but a mortal veil -- it is not for eternity!'" He promises her that the veil will not always be between them. In life, it will always be there, but once they are dead, he will no longer have to wear it. In other words,...
Mr. Hooper gives Elizabeth two reasons to stay by his side. First, he says, "'[...] hereafter there shall be no veil over my face, no darkness between our souls! It is but a mortal veil -- it is not for eternity!'" He promises her that the veil will not always be between them. In life, it will always be there, but once they are dead, he will no longer have to wear it. In other words, life is short (and so will his time with the veil be), but eternity is long, and there will be no veil then. Second, he exclaims, "'O! you know not how lonely I am, and how frightened, to be alone behind my black veil.'" He feels very isolated as a result of his veil, and to know that he retains the sympathy and love of one person would render his isolation much more bearable.
When he will not show her his face even one more time, she leaves him forever.
But, even amid his grief, Mr. Hooper smiled to think that only a material emblem had separated him from happiness, though the horrors, which it shadowed forth, must be drawn darkly between the fondest of lovers.
In order to understand why he smiles, we must understand what the veil symbolizes. Mr. Hooper has come to the realization that all human beings are fundamentally separated from one another by their failure to admit their own sinfulness to their fellows. It isn't our shared sin that separates us -- we all sin -- it is our unwillingness to be open about our sins with one another; it is our unwillingness to be made vulnerable and so to really know one another that divides each person from everyone else. We all participate in the same deception, that we are each sinless, thus we all wear the same figurative veil. Once we die, and our sins are made known to God, we will no longer feel the need to hide our true natures from one another; this is why Mr. Hooper says he will not wear it for eternity. In life, however, Mr. Hooper no longer wishes to keep up this charade and has chosen to wear the veil as a literal representation of the symbolic veil that we hold up between ourselves and others when we portray ourselves as sinless.
So, he smiles because of his realization that Elizabeth is leaving him as a result of this "material emblem" which is of little importance compared to what it represents: our fundamental human inability to really know anyone because we all hide behind this "veil," deceiving others as to our true natures. Ironically, she leaves -- not because she understands this reality, that they would always be separated by the figurative veil -- but because of the actual, literal veil that is only a symbol.