A compromise was necessary at the Constitutional Convention because, in the division of power, a dispute arose in the legislative branch.
States with large populations wanted a "population-based" representation in the houses of the legislature. On the other side, states with small populations wanted to stick to the way representation was set out in the Articles of Confederation, that is, with the same number of representatives for ever state.
This argument persisted for two months until the delegates agreed to the “Great Compromise":
Regarding population and slaves, only the Southern states had large numbers of slaves, and the dispute was based on whether slaves should or not count as part of the population. If they counted as part of the population, the Southern states would have more political power. Northern states disagreed to this but eventually, delegates of both parts compromised. Each slave would count as three-fifths of a person.