Robbing can be prevented by reducing the entrances of the hive so the attacked hive has a better chance of defending itself. Bees are immediately attracted when a hive is opened and honey supers are removed.
In the US South, robbing is an archaic term for removing honey. Beekeepers do not actually "rob" bees in modern times, but "harvest a surplus." Some historical methods of bee "keeping" actually were bee "robbing" in that hives were killed for harvest. As recently as the 1940s Southern beekeepers would "sulphur" hives to take honey. This killed the hives and required bee "keepers" to catch spring swarms to replenish their livestock. In some extreme latitudes bees are still killed at the end of the season to take all their honey, then bees are imported from lower latitudes (or even the opposite hemisphere) to begin the next season, but this practice is also dying out, mostly due to expense and movement restrictions.