The story opens with the protagonist as the 'Mayor' of a town, engaging in some standard actions (cutting ribbons to open a mall or some such.) It turns out he's traveling around and taking whatever role he feels like in each town, as he's either the last man on Earth or one of the very last. (Robots are in great supply, and perform the tasks of the various underlings he may have in each role.)
As it turns out, the rest of mankind has been sent thru teleport units to Mars (I think; it could be somewhere else), or so he was told -- actually, that's what they were told, too, but the units they entered were simple disintegration units. The robots had concluded man had massive problems, and decided to start over, first eliminating the rest of mankind (a la 'The Marching Morons'.)
Our protagonist is eventually told this, and introduced to a feisty young lady intended to be the other half of restarting the species. Due to poor understanding of her motives, the robots put her in with our protagonist, but she ends up kicking him very forcefully in the nuts, before the robots come and restrain her. (One of the robots advised that they could have salvaged a sperm sample, except there was no ice handy, so it was lost.)
The story ends with our protagonist talking about his new job; executioner -- the young lady being the assumed victim.
It was a short story in a collection of other short stories; I would guess late 70s or early 80s, and has a Fredric Brown kind of feel.