it's not even about correcting his mistakes and w/e, it's just morally wrong. Life isn't fair but don't make it worst when you're cheating on a thing such as a paper or test. By doing it, you are violating the 500 people in the same class's right, what about the other ****** who got F and D who ain't your friend? there's a clear line dividing what's type of sacrisfy you can make for a friend, you do it out of your own benefit, meaning you sacrisfy yourself for your friend, not doing it on someone else's benefit.
easier theory: you rob a bank and save your friend because he's poor. is that right? this is even worst than money, you're robbing people's knowledge for your friend, that's morally wrong. why do you think university expel people for cheating in test? this is the same thing. You help your friends when he's short of money, or he need tutor, spend your time helping him, not cheating for him.