Sometimes a user could type a particular which could be so confidential that the user does not want any other person to have a view of what is contained in the document. The user can keep the document out out of the view of other person by saving such document with a password.
The password prevents other people from getting to see the content of the document created by the user.