Upvote:19
The answer is there in the name:
Chicago Sanitary and Ship Canal
Notice "Sanitary" comes first -- the primary purpose of the canal was sanitation, and shipping was only secondary. As Chicago grew, its eponymous river turned into a big sewer. The Chicago River flowed into Lake Michigan, from which the city drew its drinking water.
In order to keep the city's poo and industrial waste out of the lake, they had to send it somewhere else. Fortuitously, the precursor to Lake Michigan had drained south during the last Ice Age, and in that channel, the nearby Des Plaines river drained south to the Illinois river and eventually the Mississippi.
The idea behind the project was to make the Chicago River run backwards, and drain into the Mississippi watershed instead of Lake Michigan.
However, as you said in the comments, the Des Plaines River was 2 meters higher than the canal at Portage Creek, where the canal approached it. A lock would have permitted shipping, but would have prevented the city's wastewater from draining south and becoming somebody else's problem.
So, the canal was dug parallel to the river until the river's elevation had lowered enough to join it. It would have meant more digging to follow the river's course.