In the first half of the 19th century Romanticism advocated for recovering values such as tradition, instinct, and emotionalism, which had been rejected during the Age of Reason or Enlightenment - which favored rationality and restrain.
As well as in creative freedom, fantasy, and nature, Romantic painters were also interested in human psychology, and in their paintings they aimed at expressing a range of psychological and emotional states (theirs or those of their sitters). As a precursor of Romanticism, and also of Modern art in general, Goya was able to capture not only the physical traits of his sitters, but also their state of mind, and he was arguably a genius at doing that - it is even possible to notice if the painter personally liked or disliked a specific sitter by looking closely at the way he painted him/her. Once he became hearing impaired, as a result of a serious illness, he turned into a very introspective and isolated man, and his paintings became very somber, both in subject matter and in formal characteristics, as if echoing the violence, abuses, and hypocrisy of the world he was living in.