In the last season of Game of Thrones, we see that after King's Landing is turned into ashes and all beings are burnt alive. Arya comes out of the ruins and encounters the most beautiful horse in the seven kingdoms unharmed and unbothered by the stench of blood. How does this happen?
This is my take on the scene. To answer your original question,
Where did the horse come from?
Though it was not shown anywhere in the episode about from where that horse did come, I think this horse belonged to Harry Strickland, captain of the Golden Company, who were fighting outside the gate of the Kings Landing. At the beginning of the fight we see him riding the same white horse.
After the death of the captain it probably went away from the battlefield (as it was outside the city gates,it could flee easily and got less wounded)and then came back after everything stopped and found Arya.
While there is no specific answer given, --and it might be possible that it could of been anyone's battle horse, as many of Dothrakis were riding such colored horses, the point of the scene was to restore a sense of magic to the series as episode 8.05 is laced with magical realism elements such as the horse.
(In the two episodes that followed 8.03, there is decline in seeing anything magical or mysterious, as a dragon is killed easily with a "man-made" object and one of the most well-intended and innocent of characters is murdered before many. It feels like magic and hope died with the death of The Night King.)
“And I looked, and behold a pale horse: and his name that sat on him was Death, and Hell followed with him.”
It also plays to Arya's parallels with Jon (in the episode) and their "Jesus-esque" chivalry and Arya's transition from a vengeful assassin to something close to a Knight, as she attempts to save a mother and daughter during the course of the episode.
This is all significant for Arya, because of her time spent with the Faceless Men, a group of assassins who worship the Many-Faced God: The God of Death. Thus having their abilities, she has become a master of death.
One my even speculate that those abilities are metaphysical (magical) and could play into the reality's magic of "living-dead" themes via characters' strange existences.
If one goes back to a few scenes, such as "Jagen" poisoning himself (to prove you can't kill a Faceless Man) and Arya not understanding how Jaqen could transfer his face to the Waif's body (and the Waif disappears from the scene entirely), while also then peeling off faces of the former Jaqen dead body, only to find her own, seeing herself as "dead" before she becomes temporarily blind, all pan to this notion of metaphysical "living-dead" characters and that perhaps The Faceless Men are "wights" of sorts (all men must serve), magically impersonating the dead in order to assassinate more people for their God.
In addition, her defeat of Waif is never shown to the audience to know for sure what went on in that confrontation, but Arya's social and physical skill set is highly advanced shortly thereafter, as seen during the course of season seven.
The Horse is also significant and plays into the nature of reality in another way. For many viewers, whom also book readers, there has always been a great debate about the nature of reality. If there is something bigger in charge or not?? That includes beliefs in reincarnation and if events of the past are somehow repeating.
The show briefly gets into these ideas by showcasing some living-dead characters or characters that come exist outside themselves (wargs, greensers), prophecies, and Hodor's Paradox.
Arya is then often shown riding grey or white ponies or horses throughout the show/books, but in the books another prophecy about Arya also comes from Melisandre:
The girl. I must find the girl again, the grey girl on the dying horse. Jon Snow would expect that of her, and soon. It would not be enough to say the girl was fleeing. He would want more, he would want the when and where, and she did not have that for him. She had seen the girl only once. A girl as grey as ash, and even as I watched she crumbled and blew away.
“The girl,” she said. “A girl in grey on a dying horse. Jon Snow’s sister.” Who else could it be? She was racing to him for protection, that much Melisandre had seen clearly.
Although the TV series does not depict an exact adaption, the similarity in language vs imagery and given how TV show version of Melisandre played a significant role in Arya coming to defeat the Night King, might be enough to make the connection that the Game of Thrones' writers were making allusions to the book and ultimately the "bigger picture"...
For instance, The prophecy for Azor Ahai to be reborn and finally break a cycle for humanity to come out of the darkness, is probably the most important to the series.
Many viewers believe that Jon Snow may fulfill the role, as his actions against Deanery's in the last episode could be a reenactment of Azor Ahai during the Age of Heroes with the ending of the series for Dany and Starks alike depicting, in broad strokes, how things might of been before the first Long Night.