Wills start out as private legal documents instructing the executor of the will on how the testator, or the will maker, wishes to have her assets distributed upon her death. However, in the interests of justice, wills are entered into the public record when entering probate, or the process by which the will is executed after the testator's death, so all interested parties can view them.
Freedom of Information Act
In the United States, the Freedom of Information Act makes all information held by the government that is not related to issues of national security a matter of public record -- either in whole or in part. As a result, any documents held by the courts and determined not to be an issue of national security may be accessible, and copies can be made upon payment of a fee. This includes land and estate documentation such as wills.
The probate court is a branch of the administration of government in the United States, and is therefore subject to the same rules as any other court. Documents that are submitted to probate become public documents, and are indexed on the public record. Similarly, self-probating wills registered with the courts before the testator's death are also indexed and available on the public record.
For a will to be declared valid in probate, it must have been created without fraud and undue influence. If a person's will was not on the public record, interested parties who are left out of the will due to fraud would have a far harder time finding out about the contents of the will, and therefore the administration of justice would suffer. Declaring wills as public records is therefore a matter of good justice.
When writing your will, bear in mind that anyone in the United States can, in theory, read anything you write. As a result, discussing family secrets or other matters the family would rather not be made public can give rise to embarrassment. Keeping the will formal can help you avoid this issue.