Complex sentence: Remaining within the enclosure allows them freedom, and to cross the fence would mean worldly danger.
Split into simpler sentences: Remaining within the enclosure allows freedom. For them, to cross the fence would mean worldly danger.