If the employer is telling you they will hold it for 'safety' or 'insurance' and it is not a statutory requirement, there is absolutely no valid reason that they would do it for noble purposes. The fact that they are threatening to withhold your pay unless you consent is an even stronger indication of a very bad situation.
Over all, be careful, it sounds like you are walking in to an awful situation where you will be taken advantage of.
If you don't need the job, consider leaving
I do not say this lightly.
Employment is supposed to be a mutually-beneficial agreement. They pay you for services rendered, and both parties should be happy with the agreement. Employers that try to go beyond that agreement to make you follow your end, they are typically up to no good. For instance:
- Employers threatening foreign workers with deportation and revocation of their visa if they quit (usually the visa actually belongs to the holder in most countries, so the consequence of ignoring it is fine, but the goal is to bully those ignorant of their rights in a foreign country where they may not speak the language)
- Employers 'holding' an employee's passport 'for safe keeping' (this is quite common in human trafficking cases where people are promised a legitimate job in another country and then are put in to indentured servitude without a passport or proper legal status making them depend on their employer for money to live on)
The point is that an employer should not need to use coercion or trickery to keep an employee. If the employer starts acting that way, they are likely to continue, and you should get out before you end up in a worse situation then you are already in.
If you do need the job, minimize potential harm
Keep sufficient savings to get a plane ticket home at any time (or make sure you have a way of getting that money no matter what happens). If you need to give them this official document, try contacting the school that issued the document, explain the situation, and ask if it is possible to get another copy in the worst case scenario.
Be very wary about any obligations your company has. If they, for instance, send you on a business trip and tell you they will reimburse you, make sure you get the money from the company to cover the trip up front, otherwise you may be out the entire cost of the business trip as well as months of pay if they decide to fire you unexpectedly.
Be very careful about local laws. Be sure you learn about what protections there are for employees (especially foreign employees) under the law. Make sure that you have legitimate working permission because if you are there illegally, it may be incredibly difficult to get the authorities to do anything on your behalf (they may just want to deport you and save the headache). If possible, I suggest contacting people from your country's embassy and explaining the situation and asking for guidance if you have no other way to learn about these things.
I strongly recommend you get out, but if you can't for whatever reason, be sure that you do everything in your power to make sure that you don't end up in a worse situation than you are already in.