虫 on the left tags 蛤 as a small living thing; in classical use it covered insects, worms, reptiles and shellfish. It indexes 蛤 with 蚌 freshwater clam, 螺 snail, 蛇 snake.
合 supplies the sound, hé shifting to gé, the same drift seen in 给 and 鸽. It also fits the sense neatly: 合 means to close together, exactly what a clam does when it shuts its two shells.