Jews were mass murdered in Germany during World War II. Why did the same thing not happen in Italy?
It is wrong to say that Italian Jews were not exterminated. They in fact were, but only after Italy was occupied by German forces.
Regarding the stance of the Italian government and fascist party, it did not express much of anti-Semitic ideology. At the origins of the fascist party were many Jews, and also Jewish black-shirt brigades of Jabotinsky were trained in Italy in a preparation to invade British Palestine.
When the Holocaust started, Italy gave asylum to Croatian Jews who were killed by the Ustashe regime in Croatia. Despite demands of German government, Italy refused to transfer their Jews or Jews from the occupied territories to Germany.
It should be noted though that in the beginning of 1940s Italy under German pressure enacted some anti-Jewish legislation in exchange for Germany's consent regarding forced expulsion of ethnic Germans from Italy's South Tyrol. Hitler sought persecution of Jews as a more important task than protecting ethnic Germans in Italy.
The legislation was easily avoidable by the Jews though: to be exempt from prosecutions a Jew could either attend a Christian church or enroll into fascist party (some other categories such as WWI veterans were also exempt).
The situation changed when Italy declared war on Germany and was consequently occupied by German forces: all the caught Jews were sent to German extermination camps.
First of all notice that although many Jews might have perished in Germany, by large the highest fraction was killed in the extermination camps of occupied Poland. Back to Italy now.
Even though the Italian Government put emphasis on the purity of the "Italian Race", it was not until 1938 that a specific law against the "Jewish Race" was approved. Italian Jews were normally admitted into the Fascist Party.
This because for Mussolini the rhetoric of the race was purely for propaganda reasons, and he did not intend to prosecute different "races". Italians living in the colonies (the Empire) had no particular problems mixing with the local population.
This changed with the aftermath of the war in Ethiopia. Italy decided to side with Germany: the British initiative at the Society of Nations (that punished Mussolini's war of aggression) removed his last doubts in that direction. f So it was more to appease the German Government than to fulfill any per-existing intention that the laws were approved.
When the extermination campaign was started in 1942, the location of extermination camps was chosen to be Poland, probably because of its lower population density, large forests and central position in occupied Europe.
Italy did not participate to the extermination at the beginning. However, following the Allied Operation Husky in 1943, and the Government inability to do anything to prevent the occupation of Sicily by invading forces, Mussolini was deposed and an armistice was signed by General Badoglio on 8th September 1943. Following the armistice, German forces occupied Italy and the Italian Army was largely dispersed due mostly to lack of instructions.
The Germans annexed parts of Northern Italy to the Reich and created a puppet state, the Italian Social Republic, or "Repubblichina" as it was derogatorily referred to by Italian partisans.
Deportation and liquidation of the Italian Jews happened only in this period of time, and within the parts of Italy occupied by Germany.
Now there is some rumor regarding the Risiera di San Sabba, according to some historians it was a (smaller scale) extermination camp, while other see it as a transit camp only. Because of the political implications the debate floats on lots of ideological noise, and I find it difficult to tell what happened. Numbers were likely small though (when compared to the overall holocaust dead).
That said, my vote goes on Anixx answer.