Those are "phono-semantic compounds" for anyone looking to do more reading up on them. The example that springs most readily to mind is "嗎" (in Pinyin "mǎ") which is a question particle you put at the end of sentences meaning, roughly, "is it not so?" The left character is "口" meaning "mouth" (in Pinyin "kǒu" but that's neither here nor there) and the right particle is "馬" in Pinyin "mǎ" (and meaning "horse" but that's neither here nor there).
https://en.wikipedia.org/wiki/Chinese_character_classificati...