Because the grey matter (part that does the thinking and stuff) is mostly on the surface of the brain. The stuff beneath the surface helps with transferring information to other parts of the brain and other things, but it doesn’t do much processing.
So if you want to increase congnition, you have to increase surface area. And the only way to increase surface area in the same skull is to fold it up, giving it wrinkles.
Latest Answers