In my time at university, I knew many capable and bright people who cheated once in a while, but only in well-picked cases, not as their general policy. For example if there was a mandatory bullshit subject, or something that they regarded as worthless waste of time etc. and rather spent the time on the important things.
I think it's a very naive shielded "good boy" view of the world that there is some simple rigid moral rule like never lie, never cheat etc. It may work in a benevolent environment like rich protective parents and never dealing with adversity. One has to develop one's own sense of justice.
This can be easily misconstrued. The point isn't to believe in nothing, be exploitative and selfish. Rather, be mindful and don't just blindly follow someone's bullshit. Indeed much of the purpose of education is to kill this ability and to certify the capability for blind obedience and jumping through hoops without ever questioning it.
One guy I mentioned in the above parts is actually really honest in general and sometimes I wonder how he gets away with it in corporate environments, saying straight nos, not putting up with colleagues criticizing him for working too fast etc. I've usually been much more careful but he's more successful. And it's an art of picking your battles, refusing bullshit, sometimes openly sometimes secretly (at least don't lie to yourself), sometimes making a stink, sometimes just complaining to fellow students, knowing the unwritten lore of which courses are unofficially considered "cheats allowed" by most talented students and probably the teacher included.
The world is complicated, but for shielded kids with underdeveloped social skills it can be hard to learn how widespread "rule bending" is in real adult life and how much this is basically known, expected and part of life.
Again, this is not to say be selfish and disregard others. Rather, think for yourself, know when something is bullshit (there is lots of fancy official institutional stamped-and-signed authoritative bullshit out there, often coming from people who know it's bullshit but either don't care of feel their hands are tied).