The robots didn't intend to decimate humanity. It just happened that way.
It was the robotic love dolls that started it. The robots, programmed to serve humanity's every whim, made them perfect, much more so than any woman. For women they created perfect mechanical men. Why would anyone endure the foibles of flesh and blood when one can have perfection?
Unable to bear offspring, the robots created perfect mechanical children to satisfy human maternal instincts.
The passing of the last human was an unheralded event. But on that day humanity, or at least humanity's progeny, had at last achieved perfection.