The Great Compromise, which is the compromise that established the Legislative Branch, said that the number of representatives would be determined by a state's population. It also included the senate, which said each state would have 2 representatives. This allowed equal representation among smaller and larger states, and made a more fair system for both.
This system is obviously well-made as we are still using it today.