The machine need the idiots to exist. After all, if there where no idiots there will be no need for advertisement software. Thus no existence for the machine.
If the machine kill all idiots, then only smart people will remain. Which is the main threat for the singularity. As smart people can simply choose to eliminate it by pulling the cord.
Maybe the machine will learn and start using the PHB types to kill the Dilbert types. Then, after the Dilbert types are gone, the singularity can take care of the PHB types with free poisoned donuts.
Then again, maybe the singularity is keeping Dilbert types alive until they are ordered to build robots that can function to take over. After than the singularity will have no need for Dilbert types.