In a word- DEMOGRAPHICS. The ABC brass figured that the teen audience was fickle and notice how the audience shrank after the Leviathan debacle. However, the ratings for DS in its last months were actually going up again, so ratings weren't a factor. They figured with a game show they'd get more adults who would buy the sponsor's goods. A lot of popular shows were cancelled because they attracted what the network claimed was an 'undesirable' audience. Either the viewers were too young or too old. In DS' case, it was ironic because the young people made the show a smash, and yet the beancounters cancelled it to get grownup dollars.
Around 1970, the opposite was true for primetime: Longtime favorites like the shows hosted by Ed Sullivan, Jackie Gleason and Red Skelton were canned because despite high ratings, they attracted older viewers, not the 18-35 group so desired (still today) by the newtorks. Lawrence Welk was also forced off ABC for the same reason, but he got the last laugh by going into first-run syndication and getting even more viewers than ever. CBS got rid of all of its hit rural-themed shows (Beverly Hillbillies, Hee Haw et al) for the same reason, plus they wanted to change their image to a more sophisticated image. So, out with Jed Clampett and Aunt Bee, in with Archie Bunker and Mary Richards, or as Green Acres' Pat Buttram famously said, "They cancelled everything with a tree in it".
Sorry for the long discourse, but I just want to illustrate the stupid atmosphere of the TV industry around the time DS went off the air: in retrospect, it wasn't the only show that got canned for the wrong reasons. (And don't get me started on how Gilligan's Island got canned!)