Music is defined by repetition and variation, and getting the right balance sounds the best. This simply happens to be optimal mix for high level repetition and variation for most people. All it is is the pattern ABABCB. It establishes a pattern, repeats it once, introduces a variation near the end, and then returns to familiarity at the very end. There are of course patterns for one to use, but that either makes it longer, more complicated, or simpler, which can leave the listener bored or confused. This particular pattern just tends to work the best in practice.