It seems that many of the framers of the Constitution thought that slavery would eventually die out. Why did they think that?
So there are a few things we have to consider here.
Firstly, we need to understand the deep cognitive dissonance that many of the Framers had regarding slavery. There were a striking number of framers who themselves were deeply invested in the institution of slavery, famously Thomas Jefferson and George Washington but also James Madison who is credited for much of the work that went into the final constitutional compromise. Of the 55 delegates at the convention in 1787, 25 owned enslaved Africans. Of the first 18 presidents of the US, 12 owned enslaved Africans. The idea that many expressed that slavery would eventually end was, for many, an excuse for sacrificing the manumission of enslaved Africans in order to prioritise other matters deemed more fundamental to the foundation of a working US government.
The two main aspects deemed more important than manumission were the unity of the nation and the protection of private property. Both would have been heavily complicated by an attempt to end the institution of slavery in the 1780s or 1790s. Enslaved Africans were considered property, not human beings, and thus any attempt to free them from slavery would have come up against fierce resistance on the grounds of the new federal government attempting to interfere with the rights of private property of slave owners.
The Articles of Confederation that had framed the governing of the US from 1783-1789 had been notoriously poor at giving effective national government. The framers had to be very attentive to any concern that the new constitution was going to assert too strong a federal government, which many people both in the general population and in the 'elite' of society still feared.
The second issue, in keeping the states united, would also have been severely undermined by any attempt at emancipation as it was overwhelmingly the states from Virginia southwards which were famously entrenched in the slave system. The census of 1790 shows that around 40% of the population of Virginia were enslaved Africans. For South Carolina it was nearly 45% and for many other states around a third of their population. Disunity would have been disastrous at this tenuous point in American history, whereby states were already forming individual trade deals with other nations as well as refusing to pay taxes to the national government.
And finally, we need to understand one crucial aspect to this story. The Cotton Gin. The chronology here is crucial, as the framers were meeting and writing in 1787, eventually to ratify the new Constitution in 1789. At this time, the crops which enslaved Africans were being forced to harvest were principally tobacco, indigo, rice and small amounts of sugar. On many plantations, these crops had been harvested for decades and the ground had been overworked, leading to decreasingly values of harvests by the 1780s - enslaved Africans in Virginia (the oldest colony) were being sold in increasing numbers to other colonies further south in the 1770s because of this fact. Tobacco prices, too, had plummetted in the 1780s and the crop was far less profitable, prompting some plantation owners to begin to switch to wheat. This trend was noticed by many of the founders, some of whom had witnessed and dealt with this first hand, and as such it's likely this contributed to their feeling when the Convention met in 1787 that slavery's end was inevitable, and therefore the issue not worth too much focus.
Everything changed though, in 1793. Only a few years after the Constitution had been ratified, the Cotton Gin was invented which suddenly made the cotton crop far easier to be harvested. Cotton plantations sprung up all across what became known as the 'deep south', where the climate was best suited to growing cotton. The Carolinas, Georgia and eventually Tennessee, Louisiana, Alabama all were huge centres for cotton production and as a result, required thousands upon thousands of enslaved Africans. The numbers of enslaved Africans transported against their will rocketed. From 1771-1790, ~56,000 enslaved Africans were transported to the US. From 1791-1800 alone, this rose to ~79,000. From 1801-1810 this rose again to ~125,000. An institution which had become less profitable in the 1780s was suddenly the most profitable industry in the US once more, built on the backs of enslaved Africans.
This is one of the reasons the cotton story is so important in the US, as it perpetuated slavery in a nation which eventually led to the Civil War. The sentiments that some of the framers possibly had, that the instiution of slavery would inevitably come to an end, was smashed by the rise of cotton. It was not something they had the possibility to consider in the 1780s, but only a few years later the rise of cotton was all but inevitable.
Yet, one final note we need to understand is how the idea that the framers believed slavery would 'eventually end' is potentially not actually that accurate. It is an idea perpetuated by American history which doesn't wish to look too deeply into the way the Constitution explicitly entrenches slavery into the US way of life and system of government. Alongside the famous three-fifths compromise, the framers of the Constitution included for the 'fugitive slave clause' which meant any enslaved Africans fleeing to free states by law could not be helped, and had to be returned to their 'owners' south of the border. This of course led to free black Americans being enslaved, as Solomon Northrup tells of in his book '12 Years a Slave'. Furthermore, the US Constitution officially prohibited the government from banning the international slave trade for at least 20 years after its ratification, further pandering to the wishes of the slaveholders. The Constitution agreed in 1787 was an intensely racist document, but of course, this is not something that is easy to explain, understand or accept for many Americans, or indeed many people that believe in the institutions of representative democracy.