It is taken from a children's story "The Three Bears" in which a little girl named Goldilocks finds a house owned by three bears. Each bear has their own preference of food, beds, etc. After testing each of the three items, Goldilocks determines that one of them is always too much in one extreme (too hot, too large, etc.), one is too much in the opposite extreme (too cold, too small, etc.), and one is "just right".