The Dreyfus Affair was a political scandal which rocked France in the late 1890's and early 1900's which had the consequence of exposing the rampant anti-Semitism of the French establishment. Captain Alfred Dreyfus was a young Jewish artillery officer who was accused and subsequently convicted of the treasonous act of selling military secrets to the Germans. On his conviction he was sent to a French penal colony on 'Devil's Island'. I would go into the details of why his conviction was wrongful but they are unimportant, it is sufficient to say that the evidence was substantially flawed and the court-marshal itself was notable for numerous procedural errors. Someone who testified on behalf of Dreyfus was even convicted for his efforts.
Dreyfus' conviction divided public opinion between the 'Dreyfussards' who demanded a retrial, people who wanted to see that justice was done, and the ultra-nationalist and anti-semetic anti-dreyfussards. For many, including the press, the Dreyfus case was a means by which to express the growing hatred of the Jews in France. Proust was certainly not the first author to deal with the subject, Emile Zola wrote of it in his book 'J'accuse'. On its publication, Zola was forced to flee to England as he was tried and found guilty of 'besmirching the reputation of the army'.
So why did Proust deal with it? Well the first and seemingly obvious answer was that Proust himself was Jewish, it is possible he was trying to defend his people from the tirade of abuse they faced. In writing about the 1890's Proust makes a telling statement on the case "the Dreyfus case was shortly to relegate the Jews to the lowest rung of the social ladder". Proust doesn't refer to his own origins in the novel but there are two characters who are both Jewish and Dreyfussards, Alfred Bloch and Charles Swann. As Charles Swann becomes unwell late on in Sodom & Gomorrah he is more and more isolated from the Parisian salon society for his Dreyfussard stance and it was the cynical reaction of people such as the crass Madame Verdurin, that Swann held on to his Dreyfussard beliefs as he was Jewish and well, those people stick together, a vulgar argument.
Another argument could be made that Proust was simply a champion of civil liberties. We have a man who has been wrongfully convicted of a crime he did not commit. But then why write about it? Proust was already helping out Dreyfus' lawyers surely that was enough for him to satisfy his conscience. Personally I believe that the frequent references to the Dreyfus case are to make a point about suffering; to draw a distinction between physiological and emotional suffering (a type that afflict many of his characters) and suffering of another kind of which there is perhaps some redress. Proust himself seems to hint at this in a letter he wrote to a friend in 1906, the year Dreyfuss was finally exonerated:
"I shall become more and more ill...more and more I shall miss the ones I have lost and all that I dreamed of in my life will be farther and farther beyond my reach. But for Dreyfus and for Piquart [the gentleman convicted for testifying on Dreyfus' behalf] it is not so. For them life has been 'providential' after the fashion of fairy tales and thrillers. That is because our suffering was founded on fact -- on truths -- physiological truths, human and emotional truths. For them, suffering was founded on error. Fortunate indeed are those who are victims of error -- judicial or otherwise! They are human beings for whom there are redress and restitution".Marcel knew physiological suffering; throughout his life he was troubled with a severe case of asthma and his weakness was echoed in the narrator of his novel. Perhaps dealing with the Dreyfus case brought him to the realisation that there are some fates that, even with a country full of people baying for your blood, you can escape but some things in life that one can never escape from.