This world is messed up.
And the fact that Justice never correctly delivers justice in any country of the world, but adds 2 to 10 years and large expenses in the process.
Sometimes, the entire community will protect its cheaters.
After you graduate, you will have a network of friends that consider you a super-smart, trustworthy, loyal and friendly person.
Chances are, you will learn more than the rest, and end up with a high GPA. And some of the lost opportunity to socialize in bars and clubs, and build networks that way, will be compensated by the relationships with people you helped.
Btw, this same behavior can still work once you're in a job. If you get a reputation as someone who can provide help when people are stuck in some difficult problem, and not shaming them for it to their boss, that tends to reflect positively back to you over time.