Buying and writing or just owning the diary are considered a Thoughtcrime (a serious offense in Oceania), which can mean 25 years in a forced-labor camp or even the death penalty. He uses the diary as a self-expression tool (which is forbidden by the Party). Despite this, Winston truly feels the need to express himself, and this ends up being stronger than the fear of being discovered. This is a clear sign of rebellion and "awakening" by Winston