It was a compromise made between the northern and southern states during the Philadelphia Convention of 1787. In order to gain high representation, the southern states wanted to count slaves as their population as well. Northern states, of course, disagreed. This is where the compromise comes.