Why do cats love boxes?

Anyone who has spent time with cats knows how they love to find their way inside boxes: cardboard, plastic, wooden, plush—any type of box will do. But why do they love their boxes so? There’s actually a scientific explanation behind the magnetic attraction between cats and boxes.