Rather than focus on artificial metrics like GPA you should focus on who you want to become. If you model yourself after the kinds of people who would flunk a student for pulling a prank that both demonstrates a sense of humor and great command of the subject matter, you will lose in the long run. In that way it is useful to identify such people so you can stay away from them, and more importantly, so you can warn your fellow students about them.
Who you look up to and learn from matters a lot.
If you want a life in academia, you need to conform and be obedient. At least until you have established yourself as sufficiently brilliant to be able to behave more rationally. Personally I don't really understand why one would want a career in academia, but hey, for some people merit badges and titles are really important and I'm not judging.
When you are young you think getting a degree and getting good grades matters more than it really does. It matters for those initial few years of your career, but once that phase is over it doesn't matter. And it matters more if you are unremarkable.
What really matters is the people you get to know at university. That's a really big deal because you will run into these people for decades to come. And you will meet people you can learn from, with whom you can collaborate etc.
As for companies like Google, Microsoft etc: there's myth and then there is reality. If you come in the front door, your alma mater and GPA will matter if you are a new graduate. If you spent your career worrying about becoming good at what you do and to collaborate with other people who are good at what they do, you won't be "coming in the front door".
I never finished a degree, but I did get a job at Google. And yahoo before that. And so on.
I got in the door because they knew I worked on things that were very relevant to them and that I probably wasn't a total fuckup. I still had to make it through the interviews though. And I did.
Of course, it should be mentioned that the hiring process at Google at the time put undue emphasis on GPA and what your alma mater was. I saw lots of people get rejected due to the university they went to or even really minor blips in their academic record. I found this disturbing. At the time Google had lots of data showing that certain metrics are not predictors of later performance. Among them GPA and alma mater. But they needed some way of cutting the sheer influx of applications down to a managable size.
If I had focused on getting a degree rather than work on interesting problems I doubt I would have gotten a job at Google. I would have been compared to a much, much larger population of unknowns and I doubt that I would have managed to stand out. Are you aware of how many people out there have good grades and good looking CVs? I do, because as an engineer at Google at the time I spent a lot of my time reading applications and interviewing candidates.
What is important is who you become. You want to find something you love to do and something you have a talent for, and then become good at that.