In the book 1984 some of the elements of the story included "Thought Police" who were controlling people's thoughts and activities. A diary would be a reflection on one's life and experiences and could lead to undesirable thoughts that would be difficult to detect and counter or control.