Most of the answers so far treat the death of a character as either a technical exercise in plot or thematic principle, or a blemish on the reader's entertainment experience. Even @ChrisSunami's intriguing and intelligent response concludes with the overly narrow
"When the death is not accompanied by this hidden sense of rebirth, we merely experience it as senseless and depressing."
These responses do not suitably address @user2859458's question. It's framed very specifically:
What makes the death of a main character satisfying or unsatisfying? (Emphasis mine.)
There are many ways in which a character's death can be "satisfying". The character's death can complete the plot. The character may be so unsympathetic that it's pleasant to see him/her die. And yes, there's merit in @ChrisSunami's "hidden sense of rebirth".
But these are minor compared to the great concept of pathos. Pathos is when the writer or composer stirs the audience's emotions. It's a peculiarly modern notion that the meaningful emotions are the simple ones such as happiness or relief. Some of the greatest emotions are the painful ones.
Satisfaction, for the reader, can involve the exercise of sorrow and grief. A sense of the tragic. A sense of loss. A glimpse of the character's courage in the face of death. Pride; departure; perhaps even transcendence.
Shakespeare understood this very well. E. R. Eddison, whose thundering novel The Worm Ouroboros chronicles - in Jacobean prose and Shakespearean dialogue - a long and bitter struggle between two kingdoms, certainly did.
Here is an edited excerpt from the end, when the Lords of Demonland stand among their dead enemies in the great banquet hall. Their triumph in this war is made bitter by the manner of its end in poison and treachery; and especially this end of the great love story of their magnificent enemies Prezmyra and Corund.
And while they gazed, there walked into the shifting light of the flamboys over that threshold the Lady Prezmyra, crowned and arrayed in her rich robes and ornaments of state. Her countenance was bleak as the winter moon flying high amid light clouds on a windy midnight settling towards rain, and those lords, under the spell of her sad cold beauty, stood without speech.
In a while Juss, speaking as one who needeth to command his voice, and making grave obeisance to her, said, "O Queen, we give you peace. Command our service in all things whatsoever. And first in this, which shall be our earliest task ere we sail homeward, to stablish you in your rightful realm of Pixyland. But this hour is overcharged with fate and desperate deeds to suffer counsel. Counsel is for the morning. The night calleth to rest. I pray you give us leave."
Prezmyra looked upon Juss, and there was eye-bite in her eyes, that glinted with green metallic lustre like those of a she-lion brought to battle.
"Thou dost offer me Pixyland, my Lord Juss," said she, "that am Queen of Impland. And this night, thou thinkest, can bring me rest. These that were dear to me have rest indeed: my lord and lover Corund; the Prince my brother; Gro, that was my friend. Deadly enow they found you, whether as friends or foes."
Juss, whose sword was bare in his hand, smote it home in the scabbard and stepped towards her. But the table was betwixt them, and she drew back to the dais where Corund lay in state. There, like some triumphant goddess, she stood above them, the cup of venom in her hand. "Come not beyond the table, my lords," she said, "or I drain this cup to your damnation."
Brandoch Daha said, "The dice are thrown, O Juss. And the Queen hath won the hazard."
"Madam," said Juss, "I swear to you there shall no force nor restraint be put upon you, but honour only and worship shown you, and friendship if you will. That surely mightest thou take of us for thy brother's sake." Thereat she looked terribly upon him, and he said, "Only on this wild night lay not hands upon yourself. For their sake, that even now haply behold us out of the undiscovered barren lands, beyond the dismal lake, do not this."
Still facing them, the cup still aloft in her right hand, Prezmyra laid her left hand lightly on the brazen plates of Corund's byrny that cased the mighty muscles of his breast. Her hand touched his beard, and drew back suddenly; but in an instant she laid it gently again on his breast. Somewhat her orient loveliness seemed to soften for a passing minute in the altering light, and she said, "I was given to Corund young. This night I will sleep with him, or reign with him, among the mighty nations of the dead."
Juss moved as one about to speak, but she stayed him with a look, and the lines of her body hardened again and the lioness looked forth anew in her peerless eyes. "...Shall the blackening frost, when it hath blasted and starved all the sweet garden flowers, say to the rose, Abide with us; and shall she harken to such a wolfish suit?"
So speaking she drank the cup; and turning from those lords of Demonland as a queen turneth her from the unregarded multitude, kneeled gently down by Corund's bier, her white arms clasped about his head, her face pillowed on his breast.
Perhaps overly long for an answer rooted in contemporary American sensibilities. May you all forgive me the length of it.
But, if you want to be a writer, you should really study the nature, and meaning, and feeling of tragedy.