Even the brain power of a goldfish is astounding a few cells of brain matter and you can actually train a goldfish. If we go closer to us in evolution and look at some of our living relatives like the chimps their brains are complex and their size is about half of human brains their brainpower is astounding they can communicate with humans via sign language they can grasp mathematics preform complex tasks.
I'd be more careful assigning characteristics of higher intelligence to animals. Most of the 'research' done is anything but scientific.
Why did we evolve so much brainpower how was such a over boost helpful to a society that used speers and farmed and gathered for food.
Well, the brainpower evolved long before farming.
Why did brains that can understand the basic laws that govern our universe evolve in a society whose basic needs where food sleep and procreate.
I suppose you could ask that about any creature with some sort of extravagant feature since 'food sleep and procreate' are pretty common characteristics in the animal kingdom.
The benefit of a brain that is better capable of understanding the outside world can hardly be in doubt. In fact, if we look at your previous comment about food gathering, consider how immensely helpful a brain that can remember the location and ripening season of a wide variety of food sources as well as the migratory patterns of delectable critters would be. It's no contest that, other things being relatively equal, the group with a better food procurement capability will outcompete the group with a lesser one.
Now, I am no expert, but what I know is that the issue of brain evolution is rather controversial and far from settled. One can easily come up with a gazillion reasons for how a more powerful brain is a better thing, but it is figuring which reason(s) rest behind the evolutionary push that is a more difficult task. Given the paucity of evidence on that regard, I'd say anyone's guess is as good as anyone else's.