Juliet says this because she is having trouble reconciling the fact that she is in love with Romeo with the fact that her family is feuding with his.
She asks Nurse to tell her his name, and when she finds out the name of the man she has fallen in love with at first sight.
His name is Romeo, and a Montague,
The only son of your great enemy. (Act 1, Scene 5)
Juliet is torn between her duty to her family, and her duty to her love. Although she falls in love with him based on what may seem like physical attraction, when she gets to know him better, the attraction grows to something stronger. Juliet ponders what makes Romeo her enemy, just because of his name.
'Tis but thy name that is my enemy.(40)
Thou art thyself, though not a Montague.
What's Montague? it is nor hand, nor foot,
Nor arm, nor face, nor any other part
Belonging to a man. (Act 2, Scene 2)
She has a fair point. A name is just a name, after all. If he was not a Montague, or she was not a Capulet, they could be together and no one would say anything. It is just a silly feud, keeping them apart. Romeo’s name is not part of him. It is not his personality. It is not a part, of him. She even goes so far as to tell Romeo to get rid of his name, so that they can be together.
Romeo, doff thy name;
And for that name, which is no part of thee,(50)
Take all myself. (Act 2, Scene 2)
Romeo agrees, saying his name is as hateful to himself as it is to her because it keeps them apart. He too has to maintain duty and responsibility, but he does not feel it as strongly as her. He is more driven by emotion and desire to be with Juliet. He is not loyal to his name.
Romeo answers to a different kind of duty than familial duty. His loyalty is to his friends. When he is in the marketplace with Mercutio and Tybalt fights them, he does not want to fight Tybalt. He is not willing to fight just because their families are fighting. Yet when Tybalt kills Mercutio, then he will pick up the fight. Loyalty to his friends is something Romeo does feel.
Alive in triumph, and Mercutio slain?
Away to heaven respective lenity,
And fire-ey'd fury be my conduct now! (Act 3, Scene 1)
The theme of loyalty is thus represented by Juliet’s loyalty to her family, and Romeo’s loyalty to his friends. He is willing to risk everything, knowing that the punishment is death, to avenge Mercutio. Juliet is also loyal to her family, agreeing even to marry Paris when she loves Romeo, because that is what she is supposed to do. She betrays her family’s loyalty twice—once to marry Romeo, and once to fake her death—and in each case it has disastrous consequences. The first time Tybalt dies, and the second time she dies.
There is no reason for the feud between the families, yet they demand unswerving loyalty from their children. It is this demand of loyalty that leads to both children’s deaths. The families realize this, and end their feud.