There were many issues at the Constitutional Convention that led to many compromises in the document itself. Perhaps the two most famous were the so-called "Great Compromise" and the notorious "Three-fifths" compromise.
The Great Compromise resulted from a debate about whether states would receive a number of representatives in Congress that was proportional to their population (favored by states with larger populations) or equal representation (favored by small states and unchanged from the Congress under the old Articles of Confederation.) The compromise, proposed by Roger Sherman of Connecticut, set up a Congress in which states would be represented equally in an upper house (the Senate) and proportional to their population in a lower house (the House of Representatives.)
Once it was determined that one of the houses would apportion representation based on states' populations, another question arose. Would the enslaved people who made up a significant portion of the populations of many states be counted for purposes of apportionment? Delegates from states with large enslaved populations, like South Carolina, thought so. Others disagreed. The compromise reached on this issue was that three-fifths of the number "all other persons," i.e. slaves, would be counted for purposes of apportionment and taxation. While the delegates did not suggest that an individual slave was three-fifths of a person, the compromise, by giving tacit endorsement and approval to the institution of slavery, has been viewed as a blot on the Constitution. It also gave states with large enslaved populations a degree of political clout they would not have otherwise had if they had not been permitted to count their "property" as people for the purposes of apportionment.
These compromises, and many others, were necessary to craft a document that was acceptable to the delegates from each region. The Constitution was a political document, the product of a lot of political wrangling and deal-making, and at key points, compromises were necessary to move the process forward.