There are all sorts of reasons why a student might cheat. Only the student can tell you the exact reason why, but some of the reasons are:
Fear of failing. Some students struggle with certain subjects no matter how hard they study and try to do well. Other students may have family or personal problems at home, or they need to work to help support the family, and they "don't have time" to study. In cases like this, students may be more willing to get a little "extra help" on a test or homework assignment by cheating.