Sperm whales may have more massive brains, but they have fewer cortical neurons total, and of course a much smaller brain to body mass ratio.
But more importantly for this conversation, our brains use up a staggering 20-25% of our resting metabolic needs. A whale brain uses something like 3%.
For us to be able to devote 20% of our calories to our brains, we simply needed to have a huge excess in the number of calories we had available. This is why the cooking hypothesis makes sense. Once we were smart enough to get lots of excess calories, that opened the door to this new fitness landscape of organisms that could devote a ridiculous proportion of their food to their brains. It wasn't that we gave up something else, it's that this wasn't even a possibility before.