Wow. Great question. So good, in fact, that we can only scratch the surface of the answers here. The most direct answer is that both plays show what the authors thought were important, how they thought important issues should be addressed, and what the conceptual frameworks of their worlds were. For example, Oedipus Rex is a play in which fate, specifically a fate that aligns with divine or supernatural aims, shapes human lives. Lives have specific patterns, and Oedipus is a tragedy because it fulfills one of the darker predictions.
By contrast, A Raisin in the Sun is set in a naturalistic world. There are evils here, but the are made by humans alone. The tragedy of this world is that the people in it do not have to act as they do. There are no gods punishing them or forcing them along specific tracks, but only racism and their own limits/the limits society forces on them.