I am answering the question based on Valmiki Ramayana along with the help of Vyasa Mahabharat.
Rama left Ayodhya for exile and Bharata ruled Ayodhya to fulfil Dasaratha's promise and hence to save Dasaratha from hell. Thus neither Rama's exile nor Bharata's rule happened solely based on Rama's decision.It can be clarified from the following words of Rama
Thereafter, the illustrious Rama, highly respected among his fraternity, (as follows) to Bharata who was speaking as aforesaid among his relatives. "......... O, Tiger among men! Your illustrious mother of beautiful complexion consequently demanded these two boons from that chief of
men, for you the throne and for me the exile to the forest. O, excellent among men! I too, have been enjoined by our aforesaid father to live here in the forest for fourteen years, in accord with granting of boon. I as such, without any rival, have come to this lonely forest accompanied by Lakshmana and Seetha in order to carry out the promise given by our father. You too ought, likewise, to make our father, as a person having given a true promise, O Indra (the Lord of Celestials) among kings, by getting yourself anointed to the crown without any delay. O, Bharata! For my sake relieve the mighty king from his vow and make both our mother and father happy. My dear brother! Formerly, an illustrious king named Gaya, while performing a sacrifice in a place called Gaya in honour of his ancestors, chanted the following verse:
Since a son delivers his father from a place of torment (hell) called 'Put', he is named as 'Putra'- 'he who delivers his ancestors from all dangers'. To have many virtuous and learned sons is to be desired, since one, at least among them, who is intimately connected will come to Gaya to perform a sacrifice. O, prince! This is the conviction of all the royal sages. O, the efficient and the excellent of men! Therefore, save our father from hell. O, the valiant Bharata! Go to Ayodhya along with Shatrughna and all the Brahmanas and give joy to the people there. O, King! I too, without delay, will proceed to Dandaka forest along with Seetha and Lakshaman........"
He was not a king while leaving Ayodhya for exile. While ruling as king after returning from exile Rama heard the following unpleasant things frequently dwelt upon by the people in court-yards, markets, public roads, forests and gardens with the help of an experienced councillor named Vadra
Having discomfited Ravana, in the encounter Rama hath released Sita, but not being the least enraged on 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 the Rama enjoy delight in her company? Having taken her to the city of Lanka, Ravana did keep her in Ashoka forest and Sita was brought under the control of Rakshasees. Still Rama hath not been worked up with hatred by Sita. From now we shall also brooke the bad conduct of our wives - for the subjects always tread the footsteps of their kings....
[section LIII, Uttara Kanda]
After hearing those words, knowing Sita as chaste for ever, Rama spoke the following words to Lakshmana
... Even the celestials speak ill of bad name - whereas fame is adored in all the regions. Therefore the high-souled expert their best to acquire reputation. O foremost of men, What to speak of the daughter of Janaka - I can even renounce my life and yourselves in fear of a bad name. Do ye therefore perceive into what great abyss of sorrow and ill-fame I have fallen. Up to this time I have never experienced such a mighty grief. Do thou, O Lakshmana, next morning, ascending the car driven by Sumantra, take away Sita to another country...
[section LV, Uttara Kanda]
Thus Rama sent Sita in fear of a bad name. That means he maintain his ideality as a king to his people.
Important points to be noted are:
Rama was not a king while going into exile. But he was a king while taking decision of sending Sita to Valmiki ashrama.
If he leaves Ayodhya as a king and goes to forest along with Sita, then the bad name may not go and it is more like accepting on to what people talk as he did not do anything wrong as king in bringing Sita back to Ayodhya after exile.
Rama as a son performed his duty while going into exile and he performed his duty as a king while sending Sita to Valmiki ashrama.
The answer for those questions in comments of necessity in leaving Sita can be justified and clarified from the following excerpt of SECTION LXI of Sisupala-badha Parva of Sabha Parva of Mahabharata (which will reappear in SECTION CXXVIII
of Bhagwat Yana Parva of Udyoga Parva of Mahabharata)
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. ....."
Based on this, there is no wrong of Rama in leaving Sita for the sake of his kingdom.
Later, (at final stages), Rama calls Sita to show the purity of her as well as him
Rama heard the highly sacred theme for many long says in the company
of ascetics, kings and Vanaras. And understanding from the story that
Kusa and Lava were Janaki's sons, Rama mentioning her name said before
the assembly :- "Send a good emissary unto the illustrious Valmiki and
let him communicate unto the ascetics that if Janaki is sinless and
has leas a pure life in the forest; let her give a proof of purity by
the great ascetic's permission. Let the emissaries learn well the
intention of an ascetic in this and Sita is at heart willing to bring in
proofs. To uphold her as well as mine purity, Let Maithili, the
daughter of Janaka, swar before the assembly."
[Section CVIII, Uttara Kanda]