In a sense, the answer to the question can be found in unpacking the meaning of the phrase "broke the law." A crucial issue in Antigone is that there are many different types of law. Laws can be laws of nature (such as gravity) which cannot be broken or human laws which can be changed by human action. Laws can be divine, such as the law of guest friendship enforced by Zeus, or legislated by humans. Even human laws can be traditional or customary or they can be new decrees set forth by individual rulers.
For Antigone, the divine law which commands women to perform funeral rites for family members is the most important law relevant to her case and she is obliged to obey it. In order to obey this divine law, she must break a recent human law put forth by Creon. In other words, she has no choice about breaking a law. The only issue is which law she chooses to break, the law of Creon or the law of Zeus. She decides that of the two, the eternal laws of the gods are more important than the ephemeral decrees of a human ruler.
The language Antigone uses when she tells Creon “that he is acting outside of God's law and against tradition and she feels justified, therefore, in defying his rule” (see the other response to this question) adds nuance to this interpretation. She calls Creon not only a “mortal” but a “mere mortal,” emphasizing his lack of stature in this moment when he claims complete authority. Furthermore, she contrasts his “edict,” a man-made law, with “Justice” (capitalized), which comes from the gods and that, as part of “traditions” that “live forever,” is eternal. The context of Creon’s edict tells us more. One critic characterizes it as “an intolerable act of violence …[because] in ancient Greece, funeral rites provided women with a rare opportunity to participate in civic life.” As a result, in burying her brother's body, Antigone challenges Creon “on grounds of moral principle, citing the will of the gods, who dictate that the dead must be buried, regardless of sins accumulated during life.” This critic also points out that Antigone’s defiance“ is an inconceivable political act - a solitary woman violates the king's decree, both for the love of her brother and to claim her proper social role.”
Antigone tells Creon that he is acting outside of God's law and against tradition and she feels justified, therfore, in defying his rule.
Creon demands, "You, tell me briefly, no long speeches -- / were you aware of a decree had forbidden this?" (Burying her brother, Polynices."
Antigone admits that she was, and Creon replies, "And still you had the gall to break the law?"
Antigone does not backdown. She defiantly challenges Creon:
"Of course I did. It wasn't Zeus -- not in the least, / who made this proclamation. / Not tome. Nor did that Justice, dwelling with the god / beneath the earth, ordain such laws for men. / Nor did I think your edict had such force / that you, a mere mortal, could override the gods, / the great, unwritten, unshakable tradtions./ They are alive, not just today or yesterday: / they live forever, from the first of time / and no one knows when they first saw the light." (Lines 495-507)