I am reading the memoirs of a rabbi, who spent roughly 10 years in the United states in the '50s and the '60s. He claims that after the Kennedy assassination the atmosphere was so strained that he was attacked on the streets of New York, and mobsters threatened to kill him for being a Jew. At a certain point he visited one of his friends, who belonged to a well known Chasidic group, and he was shocked to see that this friend put a hundred-dollar bill into his pocket before Shabbat. The friend replied that the previous week 3 Jews had been killed by robbers, who were infuriated by the fact that Jews didn't carry valuables on the Shabbat, and rather killed their victims. So their rabbi decided that the members should carry a banknote to save their lives in case of a robbery. I have no reasons to doubt the words of this rabbi, but do we know any written decisions from the era, which discuss the halakhic perspective of the problem? Since there's no deterministic relationship between carrying money and not getting killed, what are the requirements of issuing such a ruling? Do you know any similar cases?
In an atmosphere where there is a threat to life (remote, but still possible), it is permitted to override the laws of Shabbat in order to save a life. If a Rav determines that the situation is such that one should carry muktzeh or carry in a carmelit (both of which are forbidden on a rabbinic level) and that it would save one's life where a possible danger exists, then it is permitted to instruct others to do so.
The ruling likely remained in place until the situation calmed, at which point the laws of Shabbat reverted to their original state forbidding carrying muktzeh and in a carmelit.
The reason this is permitted is because even in a case where there is a 10% chance of danger to life (or possibility of saving a life), it is permitted and a mitzvah to override the laws of Shabbat in order to save their own or someone else's life. There are exceptions to this rule and it is recommended to go over them with a qualified Rabbi prior to relying on them, except in cases of a clear and imminent threat to life.
See Shulchan Aruch Orach Chaim 329 for some of the pertaining laws of pikuach nefesh on Shabbat (as well as the sources for this answer). Also see SA OC 329:7 for the possible underlying source the above-mentioned Rav may have relied on for his ruling.
This was indeed an issue at one point, and various rabbis weighed in on it. One well-known rabbi to allow carrying money on Shabbat was R. Emanuel Rackman. Here are his own words describing it, from an interview with the Jewish Review:
Now I myself have occasionally done things which others have found unduly lenient. For example, at one point I stuck my neck out in an effort to help Jews in New York who were afraid of being mugged and wanted to carry some money on Shabbat. Manhattan had an eruv and I thought there was some halakhic basis for people to carry money on the inside of their hat so that they would not experience the wrath of would‑be muggers who found them without any money at all. Other rabbis frowned upon it. But I felt there was an urgent need. There was a young man who had been mugged and beaten up bodily near New York Medical College because he had had no money on him. I was very concerned that many Jews felt fearful of going to shul without money on Shabbat. Other rabbis said Let them not go to shul, which to me was an unrealistic solution. So I stuck my neck out. Some agreed with me, some disagreed.
If I'm not mistaken, R. Shlomo Riskin was involved in this as well.
B"H A parallel issue is whether we are permitted to carry firearms within a kosher eruv on Shabbos. I am an NRA instructor and belong to a Chabad shul in Texas. The rabbi asked me to administer a security program wherein several trained and vetted individuals have agreed to act as armed security on Shabbos. It was poskimed by our rabbi (and his rav) that, given that the shul is a vulnerable target on Shabbos and a kosher eruv is in place, firearms can be carried by the assigned individuals within the eruv l'man pikuach nefesh. I believe that the same program pertains at the local Orthodox shul, as well.