Louis XVI's son, the Dauphin Louis-Charles was immediately considered the new monarch when Louis XVI died. The Capetian tradition is that of a never empty throne in France, so as soon as one king dies his heir is considered the new one even if he was 2,000 kilometers away.
The legend says that when Marie-Antoinette heard the cannons that signified the execution of her husband, she knelled for her son and called him " king ".
All that means that Louis-Charles, or Louis XVII , was a real threat for the revolutionaries. Not by himself of course since he was seven years old but pretty much every royalist faction recognized him as Louis XVII, King of France and Navarre. Provence ( future Louis XVIII ) and Artois ( Charles X ), the brothers of Louis XVI, acknowledged that their nephew was the monarch. The armies of the émigrés, the Chouans and the Vendéens all proclaimed him as their king.
With Louis-Charles alive, the succession to the throne was assured. If he died then most of the various royalist factions would probably come to a disagreement about whom should be king ( even if legally it would be Provence ). The death of the Dauphin was symbolic, he had to die ( like Louis XVI, his trial was a joke but no matter the result he had to die. Even idle Louis XVI and his son were threats ).
However, it would not be well received if they had taken Louis-Charles to the guillotine and cut his head in public. They did not have any reasons to officially kill him. The best way was to let him die, after a while people would forget him and if he died in prison any reasons could be given to justify it ( " he killed himself ", " he died during an attempted escaped ", " disease ",...Etc ). And that is what happened.
As for Marie-Thérèse it is not as clear. She herself could barely pretend to claim her father's throne as a woman ( with living uncles ) considering the succession laws but she was a symbol of martyr for royalists, nostalgic people and so on. People came to try to see her inside the Temple, she became a hero for thousands of people inside France and abroad. Keeping her locked up was a challenge, a dangerous and costly one. So many people were lurking around that they feared a plot to rescue her. If she was rescued by someone from the outside it would be dangerous, seen as a counter-revolutionary victory while if she was released it would not. Keeping her was more of dilemma than anything else. They could not kill her and had no reason to mistreat her since she could also be considered for some kind of ransom with foreign powers or royalists. And that ended up happening.
In 1795, the Convention released her against French politicians who had been captured and Marie-Thérèse left France for Austria, accompanied by her faithful valet.
So it is a matter of who they were. Marie-Thérèse was more valuable than a threat. She was the last remaining " thing " from Louis XVI. The Dauphin was a terrible threat and could have become ( if he was to disobey his father's wishes ) one of the greatest for France once grown up.
Sources : Louis XVI by Bernard Vincent, Madame Royale by André Castelot