Whenever you are working with SSOM and you are updating any information in the content database using SSOM code, SharePoint will not allow you until and unless you have not set AllowUnsafeUpdates property to True. Once the value is updated you can again set it to False.
- When a developer updates the content database without requiring a security validation AllowUnsafeUpdates property is set to true. - One the operation is carrried out, the property is again set to false .