We can make mistakes in our ongoing behaviors. Nobody's perfect.
The question is simply how you balance loyalty to the institution vs loyalty to a friend.
A lot of people will think that cheating in a context where a lot of other people cheat too, is just not a big deal. That it's certainly not worth losing a friendship over. Like, are you going to end a friendship because someone jaywalks? Because they habitually speed 5 mph over the legal limit? Because they sometimes take illegal drugs? Because they deducted things on their tax return that you know weren't actually business expenses?
The size or importance of a moral violation matters, when weighing up conflicting moral obligations.
I guess this really comes down to differences in morality.
I think cheating is pretty serious. It qualifies as self-harm, and it harms your classmates by devaluing their eventual degree.
Jaywalking and minor speeding are not even immoral at all, in my view. I don't mean they're insignificant, I mean they're outright not morally wrong to me, so that comparison suggests that we have a pretty strong difference in what we consider to be morally good here.