I can explain what happend.
Unlike normal civ, noncombatants like settlers and workers are not automatically destroyed when the last defender is defeated, but have to be killed individually.
However, you can still occupy a tile with enemy workers/settlers on it when you defeat the last defender.
What happens is that now both your unit and a settler/worker of your enemy occupy the same tile. The game "fixes" that in the next interturn by teleporting your unit outside enemy territory.
I don't know if this follows. I have conquered a city with workers in it and this has never happened. Generally, you automatically capture or kill the workers if there is only 1 military unit left with X workers and you attack with only one unit (and not X + 1 units).