To anyone who's more of a Mario fan and says it's not fair me making this cause it's copy,
I say it's more a parody to look nice and make sure characters like Nights don't get totally forgotten like any other thing from our childhood or imaginary friend.
After knowing the 1st franchise where a full dimension of imagination is materialized then you insist that all the other franchises you see after and are about dreams and imaginary stuff are related to it in-universe?
(if you don't know Nights' story)
Do you wanna believe that this purple character used to be in Sonic's dreams in childhood which inspired the hedgehog to love adventures and be fond of clowns & jester appearance?
Because after the 2nd game/ remake of Nights she is presumebely supposed to be dead because if she destroyed her father/creator Wizeman then she loses the "imagination connession" let's call it, but in the final cutscene we see she's still alive which I guess it's because it was a kids' game and so the audience gets their relief but I like when things are poorly explained because this way we can interpret things however we want.
If you played or saw Sonic & the secret rings then you remember the world rings looking alike Nights' Ideyas to collect to go forward in the game and the last boss fight looking alike Wizeman cause it has more arms and is gigantic while sonic gets a new form thanks to some of the rings like it's a nightmaren version of him.
I came up with thinking that the game was all a dream of Sonic, as obvious, but it was made with the same magic of the enemies from Nights' game and despite Wizeman was no more nightmares are for everyone and so even the same magical energy are the same universe.
Peraphs the purpose of that dream was to make more nightmare creature to re-build an army for whoever decided it and the bad side was supposed to win but Sonic won thanks to his optimism and belief in hope won just like in his real life and when he wished for Sharah the genie to come back to life he also unwillingly revived Nights who was in that other character's form and the crying wasn't what the players would think but it was actually joy tears because she was back to exist thanks to Sonic whom she thought maight have forgotten her and from that moment on NIghts had literally a new life and she had new kind of adventures and new friends until she & Sonic eventually meet again.