Rama didn't learn the purity of Sita from the fire-test. Rama always knows about the purity of Sita. Thus witness from fire-test is immaterial for Rama. Fire-test is intended for proving chastity of Sita to others. It is evident from the following words of Rama
I have been born in the illustrious family of the high-souled
Ikshawkus. Sita hath been born also in the holy family of the great
Janaka; gentle Lakshmana, thou knowest how in the solitary forest of
Dandaka, Sita was stolen away by Ravana and how have I slain him. At
that time even I was stricken with anxiety regarding Sita that how I
could take her home since she had resided in the house of the
Rakshasas. To secure my confidence, Sita, in your very presence,
entered fire. At that time, O Saumitri, fire, carrying sacrificial
oblations and the wind of the sky declared Sila's innocence before the
celestials. In the presence of all the Rishis and gods, the Sun and
Moon announced the innocence of the daughter of Janaka. Indra, the
king of the celestials, himself handed over the chaste Sita unto me in
the island of Lanka. My mind knoweth Sita as chaste for ever. So,
at that time, I came back to Ayodhya with Sita.
[Section 55, Uttara Kanda, Valmiki Ramayana]
It is evident that the citizens of Ayodhya are not the direct audience of Sita's fire-test.
Rama, Lakshmana and very few others may directly witnessed the fact that Sita proved herself by fire-test. But the people of Ayodhya did not witnessed it directly and hence the rumors got originate. It should be noted that a King should not use the strength of words of very few people, including himself, even though they are true, to make such decisions (of keeping Sita intact in kingdom after rumors). The truth should be validated and verified in front of all others also. Such virtue of a king can be observed from the following words of Dushmanta from the Mahabharata. Dushmanta did not accept his wife Sakuntala and his son Bharata until celestials validate it in front of others.
"Vaisampayana continued, 'Sakuntala having spoken to the monarch in
this wise, left his presence. But as soon as she had left, a voice
from the skies, emanating from no visible shape, thus spoke unto
Dushmanta as he was sitting surrounded by his occasional and household
priests, his preceptors, and ministers. And the voice said, 'The
mother is but the sheath of flesh; the son sprung from the father is
the father himself. Therefore, O Dushmanta, cherish thy son, and
insult not Sakuntala. O best of men, the son, who is but a form of
one's own seed, rescueth (ancestors) from the region of Yama. Thou art
the progenitor of this boy. Sakuntala hath spoken the truth. The
husband, dividing his body in twain, is born of his wife in the form
of son. Therefore, O Dushmanta, cherish, O monarch, thy son born of
Sakuntala. To live by forsaking one's living son is a great,
misfortune. Therefore, O thou of Puru's race, cherish thy high-souled
son born of Sakuntala--And because this child is to be cherished by
thee even at our word, therefore shall this thy son be known by the
name of Bharata (the cherished).' Hearing these words uttered by the
dwellers in heaven, the monarch of Puru's race became overjoyed and
spoke as follows unto his priests and ministers, 'Hear ye these words
uttered by the celestial messenger? I myself know this one to be my
son. If I had taken him as my son on the strength of Sakuntala's words
alone, my people would have been suspicious and my son also would not
have been regarded as pure.'
"Vaisampayana continued, 'The monarch, then, O thou of Bharata's
race, seeing the purity of his son established by the celestial
messenger, became exceedingly glad. And he took unto him that son with
joy. And the king with a joyous heart then performed all those rites
upon his son that a father should perform. And the king smelt his
child's head and hugged him with affection. And the Brahmanas began to
utter blessings upon him and the bards began to applaud him. And the
monarch then experienced the great delight that one feeleth at the
touch of one's son. And Dushmanta also received mat wife of his with
affection. And he told her these words, pacifying her affectionately,
'O goddess, my union with the? took place privately Therefore, I was
thinking of how best to establish thy purity. My people might think
that we were only lustfully united and not as husband and wife, and
therefore, this son that I would have installed as my heir apparent
would only have been regarded as one of impure birth. And dearest,
every hard word thou hast uttered in thy anger, have I, O large-eyed
one, forgiven thee. Thou art my dearest!' And the royal sage
Dushmanta, having spoken thus unto his dear wife, O Bharata, received
her with offerings of perfume, food, and drink. And king Dushmanta,
then, bestowed the name of Bharata upon his child, and formally
installed him as the heir apparent.
[Section 74, Sambhava Parva, Sambhava Parva, The Mahabharata]
Another point to be noted is given in this answer. An individual can always be left for the welfare of the kingdom.
Vaisampayana said,--"During the course of this gambling, certain to
bring about utter ruin (on Yudhishthira), Vidura, that dispeller of
all doubts, (addressing Dhritarashtra) said, 'O great king, O thou of
the Bharata race, ...... For the sake of a family a member may be
sacrificed; for the sake of a village a family may be sacrificed, for
the sake of a province a village may be sacrificed and for the sake of
one's own soul the whole earth may be sacrificed. ....."
[Section 128, Bhagwat Yana Parva, Udyoga Parva, The Mahabharata]
You may get the doubt that how can leaving Sita can be helpful in welfare of the kingdom. You can get the answer from the following words of citizens.
Having discomfitted Ravana, in the encounter Rama hath released Sita,
but not being the least enraged or account of her being touched by
Ravana he hath brought her to his own city. Ravana did forcibly place
Sita on her lap; how can then Rama enjoy delight in her company?
Having taken her to the city of Lanka, Ravana did keep her in the
Asoka forest and Sita was brought under the control of Rakshasas.
Still Rama hath not been worked up with hatered by Sita. From now we
shall also brooke the bad conduct of our wives — for the subjects
always tread the footsteps of their King.
[Section 53, Uttara Kanda, Valmiki Ramayana]
Observe the words of citizens. They are thinking (wrongly) that ignoring the bad conduct of wives is allowed since Rama is doing it. They are thinking in such a wrong way because of the reason that they did not witnessed the fire-test directly. If Rama did not leave Sita, then the virtue of citizens in the kingdom as husbands will be in peril.
Rama left the company of Sita for the welfare of kingdom. But remember that he safely landed her in Valmiki ashram.
So, final points to note are
Rama always know that Sita is chaste. (Sita's voluntary) Fire-test is intended for others.
Citizens of Rama's kingdom did not witnessed the fire-test.
A king should not make all decisions (particularly of this sort) based on facts that only few people know. He even needs validation of facts in front of others.
A single person can be sacrificed for the welfare of kingdom.