Because you must. Formally speaking, a thesis project is a mandatory examination that you must take to get your degree.
Regarding a thesis as just another exam, however, does not do it justice. Exams are formats tailored for ease of marking. A thesis, on the other hand, is tailored for effective learning.
In exams, there is no space for your own creativity. To me, taking an exam feels like assembling a piece of IKEA furniture: somebody else has designed the solution and its parts; I merely have to put them back together. While there are many ways to screw up the assembly, there is only a single correct solution. Consequently, the things I can learn during the assembly process (apart from the very fundamentals of handling the tools) are limited, too. Furthermore, knowing that the best you can do is not screw up, does not exactly boost motivation. That’s why neither taking exams nor assembling furniture are very popular.
From the point of view of the university, however, this makes perfect sense. I learned this the hard way. One test we devised involved creating a state machine. Its description was incomplete and thus left space for creativity. In consequence, 50+ valid solutions existed. This makes it hard to mark, since you cannot simply compare the student’s solution against a single correct one. This particular test was taken by about 1000 students. Since each one must be marked independently by two advisors, we suffered from that mistake 2000 times. Since then, we have established a quality assurance step that makes sure that each test only has a single correct solution. I am certain that most other groups do the same. Exam design thus aims to eliminate student-individual feedback to minimize overall costs.
A thesis project, on the other hand, is tailored to you. You can choose the topic according to your interests and strengths. You get individual feedback from your supervisor—in many cases on the order of several weeks of dedicated time for personal feedback. A thesis is thus the single best study format in terms of educational quality of service you will ever receive from your university.
Furthermore, a thesis is a stepping stone for many. Some publish the results as a research paper and present it on a scientific workshop or conference. This way, a thesis can open a door into the workings of the scientific community. Others do their thesis at a company and collect experience with real-world problems and solutions. In many cases, this opens a door towards a paid internship or lands the first post-graduate full-time job.
Perceiving a thesis as yet another examination thus falls short. It can even be harmful, since it makes the thesis loom like a chore. Instead, perceive it as something to look forward to: as the most tailorable study experience you can get, with the best quality of educational service your university has to offer. It’s a great opportunity for those who grasp it.