Friedrich Nietzsche said this quote

The end of a melody is not its goal: but nonetheless, had the melody not reached its end it would not have reached its goal either. A parable.