I have a strange opinion on this, I think. I am going to say that grades DO matter, but they kind of meaningless too.
So the reasons why they do matter: 1. it's a measure of how well you handle an academic environment and digest course material. 2. A lot of things care about what this is. If you are planning to move on in school or get hired by someone else, then you need to have do well on the scale that matters to them. To think otherwise is kind of useless.
Now why I think they are meaningless. So, I had an interesting reversal in my academic career with college. Before then, I was a super straight A student (in the top 30 of a class of 1000 and super high SAT scores), and then I went to one of the top engineering programs in the country who was famous for it's lack of grade inflation. Apparently so much that there were only 7 people in the history of the school who graduated with a 4.0. I kind of floundered while I was there because I had undiagnosed learning disabilities that weren't even close to tested until I got to such a rigorous environment, but I ended up dropping out for completely unrelated reasons (my parents had issues with the IRS, and that was a game ender for me because apparently the only way my parents were able to afford my school was taking out giant loans, which you cannot do when you have an IRS lien) Even when I left, my GPA was a 2.2. Not kick out of school bad but not great. However what I can tell you is I have never learned so much of anything in my life in those years. I self-study a lot these days, but half of what I can do in math and science is thanks to what that school taught me. I'm currently a tutor who works with mostly students with learning disabilities and I credit that school for teaching me all the things I am passing on to my students, but I guess even more so, it taught me a bunch of humility about learning and how incredibly difficult academia could be. I would never ever trade anything for what I got out of there.
So while I waited for my parents to figure out their financial situation (hint: it's 5 years later and surprise surprise, it's still a thing), I went to a local community college, and had straight A's in class while working a near full time job, and I read books in class. Now that I'm an independent student and finance my own schooling (so much nicer because I am in control), I'm at a more vocational type night school, and also again have a near perfect GPA. I have some bad grades when my business gets busy, especially during midterms and finals, but honestly, I'm okay with that because I am actually not sure how important my GPA is going to be as I continue in my work. I am finishing the degree and the teaching credential because at this point, I'm a few months from graduating so why not. My tutoring business is really flourishing and what seems to matter is if I know the material (and thanks to college 1 I do)and how well I can teach it. I do miss out on some students because they want the ones who finished the fancier colleges, but I love the students who do take a chance on me, because they need someone who would be empathetic to them and their needs. I am happy with where I am because I stumbled ass backward into a decently successful job that is highly rewarding and I'm grateful for it. Though, I'm not naive, so I know that because it worked for me, it might not work for everyone else either.
Anyway what I was trying to make from this is that it's weird to me that we measure GPA using the same numbers, when it's been super clear to me that a number measured from one source is clearly different from another. I think my education from college 1 was way more important than from the community college and now current school, but GPA in college 1 said I learned nothing by what some of the commenters in this thread has said, but in the other schools, it says that I learned a lot, which has been kind of patently untrue since I can get those grades while going through the motions. Just my personal experience here.