For your first question:
Why did Rama exile Sita?
The general reason is that in Rama Rajya, Ram used to provide everything to his people what they wanted. So he exiled Sita for the sake of people.
But every general seeing thing have some deep mystic connection to something. Similar is the case here. It was because Sita was cursed by a parrot to happen that. These parrots were near Valmiki Ashram hence they have mastered some verses of Ramayana. One time they went to Mithila and Sita heard about her story singing by them. This is in Padma Puran.
Padma Puran Chapter 57 "Former Birth Of Washerman"
41-53. "Lucky is that queen Janaki (i.e. Sita), having a very attractive form, who will gladly enjoy with him for a myriad years. O beautiful lady, who are you? What is your name that you cleverly and respectfully ask me to narrate (the account) of Rama?"" Hearing these words, Janaki, telling the couple of birds about the charming and enticing (story of) her birth, said to
them: "I am that Janaki, the daughter of Janaka, whom you mentioned. I shall truly release you when that very charming Rama comes to me; not otherwise-—being (just) allured by your words! I shall caress you. You, having (i.e. speaking) sweet words, stay happily (with me)." Hearing these words they trembled and were frightened. They were mutually (i.e. both)
afraid; (and) said this to Janaki: "O good lady, we are birds, living in forests and resorting to trees. We wander everywhere.
We would not get happiness (merely by staying) at home. I am pregnant. Having gone to my place and having given birth to
sons (i.e. young ones) I shall come (back). I have told you the truth." (Though) thus addressed by the female parrot, she did
not release her. Then her husband (i.e. the male parrot), eager, and with his face hung down spoke to her: "Sita, release my
wife. How do you keep this my beautiful wife? We shall go to the forest and shall happily move in the forest. My charming
wife would be (i.e. is) pregnant. Having performed her (i.e. after her) delivery I shall come to you, O lovely one?" Thus,
addressed, she said to him: "O you very intelligent one, you can gladly go. I shall keep this happy one, doing what is dear to me, near me." Thus addressed, the bird was unhappy; and full of tenderness, he said to her: "Those words which are uttered by the meditating saints are true: (The words are:)
54-56. 'One should not speak, one should not speak. One should remain by resorting to silence. Otherwise, due to the
blemish in one's utterance, the mad one would be fettered.' Had we not talked (to each other) on this tree, how would we have been bound? Therefore, one should resort to silence." Saying so, he spoke to her: "Obeautiful lady, O Sita, I shall not live without this wife of me. Therefore, O you charming one, leave her."
57-66. Though admonished with various words, she did not release her. The (parrot's) wife, who was angry, and miserable, then cursed Janaka's daughter: "As you are separating me from my husband, in the same way you will be, when pregnant, separated from Rama." When she, the afflicted one, was repeatedly > saying like this, her life departed due to misery, full of the distress of her husband. For her who was repeatedly remember-
ing Rama and uttering (the name) Rama, a divine car properly arrived. The female parrot became luminous when she had gone to heaven. When she died, her husband, that lord of birds, was extremely angry, and being distressed, fell into Ganga: ''In Rama's city, full of people, I will be born as (a sudra so) that due to my words she will be dejected, and extremely unhappy due to separation (from her husband)." Saying so, he who was distressed, angry, frightened and shaking due to separation from her, fell into the water of Ganga graced with eddies. Due to his being angry, due to his being distressed, and due to his having insulted Sita, he obtained very (mean) sudrahood (as he was born as) a washerman named Krodhana. That best bird (or best brahmana) who, doing ill to the great, abandons his life through anger, obtains sudrahood after he dies. That took
place. Due to the words of the washerman she was censured and separated. On account of the curse of the washerman, she was separated (from Rama), and she went to the forest.
For your second question:
Why did Rama ask Sita for a second test?
Again the general reason is same as before i.e., as a King for the sake of people.
But this also comes under a mystic leela. This was done to depart earlier from earth to his eternal abode. At that time age was very high. E.g., Dasharath was more than 60000 years old when Ram was born. But it was necessary for Rama to depart earlier as he came to rule only for 11000 years.
In Adhyatma Ramayana [ Brahmanda Puran ] Uttar kanda 7.8. Kaal disguised as sage tells Rama..
7.8 To emancipate the gods you incarnated as Vaman, and later you dawned over earth for a period of eleven thousand years to eliminate Ravan. The period is now over, still if you wish to stay you may do that otherwise you may plan your departure to your abode of Vishnu lok.” Ram responded positively to kal and confirmed his departure back to the eternal abode.
Hence Rama had preplanned for his earlier arrival from earth. In Adhyatma Ramayan [Brahmanda Puran ] Uttar Kanda 7.4.
7.4 Finding appropriate time, Sita spoke to him, “Gods have approached me to remind you to leave the earth and move to vaikunth. They miss your presence in the celestial world. Since I am here, you can’t leave the earth. They advised me to first leave for eternal abode.” Responding over the message of gods he planned course of action with Sita, “On the pretext of public criticism I would discard you. You are pregnant, and you will be sent to the ashram of Valmiki. There you will give birth to two sons. Thereafter you will again
come back to me, but to prove your chastity you will ask the earth a safe place. Accordingly the earth will split, and entering through the earth you will reach vaikunth. I
would thereafter follow you.” After this conversation, Sita left the royal garden and entered the palace. Ram continued
in his palace meeting the people. He enquired from Vijay, a royal spy, as to what was the peoples’ impression about Sita and Kaikeyi. Ram was told, “Some people condemn the acceptance of Sita after her long stay in Lanka. They are of the impression that this incident has made their wives also wilful.”
Hence Gods Leela are very mystic. If we go deeper and deeper we find more and more mystic.