Complex sentence: When cornered, they defend themselves by biting, but they prefer to run away.
Split into simpler sentences: When cornered, they defend themselves by biting. But they prefer to run away.