The beginning of the story of The Emperor's New Clothes is long lost, but we do at least know how it ends.
The Emperor's New Clothes was first written down (though not made up) by a Prince, Juan Manuel of Villena, in a collection of stories written in 1335 called Libro de los ejemplos.
Prince Juan Manuel's version of the story was more or less as we know it now, except for the ending. In the Libro de los ejemplos the story ends with the emperor's courtiers all admiring the naked emperor.
The child who shouts 'the emperor has no clothes!' was the invention of a later collector of stories, Hans Christian Andersen. His version was published in 1837.
Why did he change the ending of the story? Well, it's a much better ending, which is reason enough.
Andersen did tell a story in his old age about seeing King Frederick VI for the first time and calling out to his mother but he's just a human being! so the idea for the new ending might have come from there.
I don't know, though, that seems a little tidy to me.
I love this story, anyway. The grown up powerful people turn out to be rogues and idiots, and the child turns out to be wise and clear-sighted.
Just how things seemed to me when I was young.
And much how it seems even now.
Word To Use Today: emperor. This word comes to us from the Old French empereor, from the Latin imperātor, which means commander-in-chief. Before that it's from parāre, to make ready.