open one's mouth, bare one's teeth, empty
呀 centers on the mouth being wide open, whether to show teeth, express surprise, or gape emptily. The 'empty' sense extends from the image of an open, hollow mouth.
呀 combines 口 (mouth) with 牙 (tooth/tusk), suggesting a mouth with teeth visible or open. The exact historical development is uncertain, but the component relationship is straightforward.
A mouth 口 with teeth 牙 bared: the mouth is wide open, showing teeth, or gaping emptily.
For ガ, imagine a person opening their mouth wide and making a loud 'GAH!' sound in surprise: GAH -> ガ.