Since the combination of first and last name is not necessarily unambiguous and there could exist for example two students named John or Jane Doe, each student receives a matriculation number. It is an individual number with which it is possible to identify you unequivocally at the university.
During your studies you will need your matriculation number particularly in situations where it is very important that you are being clearly identified, such as exams, forms or for the new semester. re-registration
In the past, exam results were also posted according to matriculation number, so that anyone who would have known your matriculation number could have easily found out your grade. Therefore, it is important not to simply pass these on to others.