In TNG Season 3, Episode 3 titled "The Survivors", Counselor Troi hears a repeated melody in her head that drives her almost to insanity. We (the audience) learn the source of the song relatively early in the episode.
(the music box)
By the end of the episode, we've learned the secret of the survivors, and someone has removed the music from her mind.
(Kevin Uxbridge, a Douwd - a previously unknown race with immense power)
Why did she hear the music in the first place?
Especially since the one who caused it was able to take it away so easily?
(There may not be an actual confirmed answer, so I'll accept conjecture and opinion as long as it's derived from actual events in the episode or series)