Two senses share the verb: literal robbery (
店铺遭劫 'the shop was robbed') and figurative calamity (
遭劫难 'to suffer a disaster'). The character
劫 jié carries both meanings — it originally referred to a Buddhist 'kalpa' (eon, often a catastrophic one) and extended into 'rob / plunder'.
遭 zāo means 'to encounter (something bad)' — it always introduces misfortune (
遭遇,
遭殃).