כל בית ישראל מצווין על קדוש השם הגדול הזה שנאמר ונקדשתי בתוך בני ישראל. ומוזהרין שלא לחללו שנאמר ולא תחללו את שם קדשי. כיצד כשיעמוד עובד כוכבים ויאנוס את ישראל לעבור על אחת מכל מצות האמורות בתורה או יהרגנו יעבור ואל יהרג שנאמר במצות אשר יעשה אותם האדם וחי בהם. וחי בהם ולא שימות בהם. ואם מת ולא עבר הרי זה מתחייב בנפשו:
"Every House of Israel is commanded on the [commandment] of 'Kiddush Hashem' (Making the Name Holy) the great and holy [name]. As it says in scripture (Vayikra 22: 32), 'I shall be made holy through the children of Israel.'
Also, we are warned not to disgrace His [name]. As it says (ibid), 'Do not disgrace My holy name.'
How [does one disgrace G-D's name? For example,] during a time when a none Jew goes to force a Jew to desecrate one of the commandments that are stated in the Torah or be killed, [the Jew] should desecrate the commandment. This is because it is stated in scripture (Vayikra 18:5) 'With the commandments that a man will perform and LIVE BY THEM.' Not die by them!
If someone dies instead of desecrating the commandments then he is 'Obligated to die.' (Aka he dies, but he also dies guilty of the death penalty by a Jewish court)."
The next halacha in the Rambam exludes three commandments, but before we get to that let's discuss this idea. Every Jew is obligated in making G-D's name holy. That is a very powerful statement, but is so much more than just a commandment.
Every Jew is not just a Jew, but a representative of G-D and the religion that G-D gave to man, according to the Jewish tradition. Therefore, every Jew must act as if other people are judging G-D based on them, because they are. If a Jew acts inappropriately then everyone watching him or her is not just judging them as a person, but as part of the Jewish religion and our G-D. On the other hand, if we act inappropriately it reflects poorly on our religion and G-D.
It is very interesting that the Rambam chose this specific case, someone dying instead of desecrating a commandment. That sounds like a very controversial case. What is the Rambam's point here that if someone dies instead of desecrating the commandments he or she is obligated to die which translates into a very severe penalty?
I believe the Rambam was trying to tell us that we should not be overly righteous. You think that the commandments are the end all be all, then you are an unwise and unrighteous Jew. A Jew is someone who can take perspective on things and realize the right thing to do in every situation. Someone who is unwilling to following the ideals of the Torah and only looks at their strict law without common sense is a fool. He or she is not just a fool, but a SINNER.
This is what the Rambam's underlying point is, one should realize the Torah is a guide to life, to make man's life better and more meaningful, not a hindrance. Someone who gives up their life for the commandments (except the three exclusions in the next halacha) refuses to understand the meaning of the Torah and G-D's will and does not deserve to represent the Jewish people to the rest of the world. This is because they do not actually represent the Torah and G-D's will.