kind of tapir, fierce beast depicted on the door of prisons
狴 refers to a fierce, mythical beast resembling a tapir, traditionally depicted on prison doors as a guardian or symbol of authority.
狴 combines the animal radical 犭 with 坒, which likely contributes a phonetic element. The character is associated with a legendary fierce beast, but the exact historical development is uncertain.
The animal radical 犭 hints at a beast, and the right side 坒 (which looks like a comparison 比 over earth 土) suggests a creature that stands guard over the ground. Picture a fierce tapir-like beast stationed at a prison door.
For ヘイ, imagine the beast letting out a heavy 'hey!' as it guards the prison: hey -> ヘイ.
—