The government of the American colonies allowed slavery for a number of reasons. First and foremost, it was considered necessary for the upkeep of America's agrarian economy. Many of America's social elite—the very people in charge of running the government—relied on slave labor to work their extensive landholdings. Without what they regarded as the economic benefits of slavery, wealthy landowners would've had to hire workers instead, at considerable cost.
A further consideration was what to do with slaves in the event of their being emancipated. A number of schemes were entertained, including the wholesale deportation of slaves back to Africa, but for one reason or another were considered wholly impractical. Even though many leading members of colonial society strongly opposed slavery on moral grounds, they were reluctant to argue for its abolition, as they were unsure of the potential fallout. They allowed slavery to remain, if not develop, kicking the can further down the road so that future generations would have to deal with the problem instead.