Units like villagers can climb up stonewalls using unfinished stone towers, you can destroy the stone tower afterwards to trap your units there. - well if you want to.
Not that it hurts anyone, but theoretically you could spawn a stonetower bring all your ranged units up there to defend and get them back down without spending any ressources.
This only works if a villager atleast started builiding the tower, not with the blueprint of the tower.
This does not work with gates, only with towers.
This might not be a bug, but a unfinished structure should not be usable without actually building it.