why did the great compromise establish a two house legislature

The United States is a Union of equal States.

However it is also a democracy where every citizen counts.
In the Senate, states are equal represented by two senators each.
In the House, people are more equal with populous states having more representatives.