This rare kanji has no clear standalone meaning. Treat its meaning as uncertain.
The exact historical development of 宐 is uncertain. It visually contains 宀 (roof) and 彑, but the original component relationships are unclear.
Since the meaning is unclear, focus on the shape: a roof 宀 over a pig's head 彑. Imagine an uncertain object stored under a roof.
For ギ, imagine a mysterious object under the roof that gives you the giggles: giggles -> ギ, because you don't know what it is.