Rousseau reveals unsavory elements of his character in The Confessions because he wanted to relate his character's situation to the actual situation of the modern society. This corresponds with the broader ideas of Romanticism like tackling the issue of the unnaturalness of inequality.