Roof radical on top — the indexing radical. 它 was originally a pictograph of a snake (now written 蛇), and the 宀 'roof' represented the home. Together: 'house-snake', a household pest one had to watch out for.
Bottom 匕 — here a stylised snake body, originally a curling form depicting the serpent's coiled posture. The whole picture: a snake under the eaves. The pictographic origin survives only in etymology; modern usage is purely the inanimate pronoun 'it', borrowed via sound.