We don't see much of King Aegisthus until Orestes is about to kill him at the end of the play. He's set up as a villain in that he opposes our protagonist, Electra, and his impending death functions as the end goal to which the play is building. When Aegisthus finally does show up, he's everything we expected him to be. He happily thinks that Orestes has died and wants to celebrate. This reaction just reinforces his image as a bad guy.