I would have said no to this, probably, at the beginning of my course at Uni. Towards the end though, I'd gotten much more pragmatic.
I was fed up of studying in my last year of uni. Years of doing it = bored. Solving problems had lost it's fun. Partly because they were so much harder.
As a result, I tracked my grades and performance very closely. I knew what I needed to get in every exam to get what I wanted (a first) and worked just as much as I needed. I started making strategic decisions, such as what I needed to learn to answer questions satisfactory, rather than previously I'd learn all I could to understand the subject.
Our exams were structured with a question you could drop, so I'd study past papers and learn only what I felt I needed to pass (often this worked, gap in knowledge could be worked around).
Basically, Uni became less about learning and more about passing. My focus was on what came after, I wanted to be working in a years time. Feeding into my decision is that I quickly decided I didn't want to work in Physics (my degree). The only real option was academia, which clearly I didn't want to do.
So I would be using my degree to get a job doing something other than Physics, so an in depth knowledge of the subject only served me one purpose - getting a tick in the "degree" box so I could go do engineering or software development.
Ultimately, I managed things very well and got a comfortable few percentages over a first - slap bang on my target grade. No point getting 90% when I can get 72% and it's all the same in the end.
Am I glad I did this? Sure am. Never touched any of my knowledge of physics, even as a job as a data analysis. My first job out of Uni was in software (then did some engineering, now back to software) so I owe my career to what I did in my spare time during my degree. I was completely self taught. So yeah, glad I didn't put more effort in and less into that!
I've mostly forgotten the stuff I learned at Uni. It's pretty useless to me.
That said, there are more nuanced skills I learned that I wouldn't have had I not had the experience, and personal development that I wouldn't want to have missed out on. I don't think I would have done so well later if I had not had to put that work in.
Would I cheat to get a first? Yes. But I'd somehow do it without myself knowing so I'd still have to do the work, but if I did fail I'd not have to deal with that (and magically find out I'd cheated). In reality I'm too risk averse to cheat. But magic?
So who knows, maybe I did meet a jinni and he granted my wish and made me forget!