Because he married one--a genuine suffragist, even though the marriage was not a happy one. After she died, he blamed himself for how unhappy he made her, even though she was often cruel to him about how she felt that she had married beneath her station--which she said aloud to anyone who cared to hear. And yet he still felt so much remorse that it resulted in some of his most memorable poetry.
But all of Hardy's life was on the difficult side. Despite being quite intelligent, he came from a family of limited means, so his education would be equally limited. Like the protagonist in Jude the Obscure, he worked on architecture projects, not writing, after leaving school. Some of his unhappiness with that found its way into the novel. And then his infelicitous marriage provided the bulk of material for his later work, both in novels, but especially his poetry.
I've always considered Hardy a better poet than novelist, because the strictures of poetry reined in his tendency in longer works to get carried away. A good deal of his poetry is sad, even heartbreaking, but nearly all of it is quite insightful and beautifully phrased.