We have a South Korean. The boy, now grown, and the girl, now grown, living her life in disguised as the crown prince, meet, as he has been hired/ordered/commandeered to be the crown prince's tutor. They lock eyes. She know who he is. He only knows her as the crown prince. The last time they met, she told him never to show his face again. She does not say it, but she would have to kill him if he found out the prince was a woman, the twin sister of the actual prince. Romance! Tension! And from the closet a female singer appears swirling around like a Disney cartoon, singing a lovely love song (??? I don't understand Korean!) or something sweet and uplifting. It sounds romantic. The second episode ended like this too, with the same song. Possibly the first as well. It always seems to rip one out of the historical period, out of the moment.
No one actually pops out of a closet and swirls around, but it is just as jarring. In my mind, the dancing happens, just as often at the end of an episode from The Glory, I imagine a Muppet singing. I'm sure it is a cultural thing and very possibly my ASD. A simple piano piece seems it would be less jarring.
However, because I can be a total a-hole about my opinion, throwing my judgement around like it means anything, and possibly insulting the Korean talent, I recognize it is the end of the episode. Perhaps it is a nice way of pulling the viewer out of the romantic butterflies of the royal prince and his (her) childhood heartthrob.