Electra examines what happens when different kinds of duty come into conflict. There is duty to family members, to the gods, to the state (as demanded by law), to the dead, and to the self. Which duty should take precedence? The title character believes in an abstract duty unconditionally, even when it contradicts one's own will and all logical pragmatism. Whether or not the ending justifies the consequences of such devotion is subject to debate.
Electra wants her mother and Aegisthus dead purely out of a sense of duty, not due to emotional or personal reasons.