Right side
必 supplies the sound: bì → mì with regular b/m alternation in older Chinese.
必 also appears as phonetic in
泌 (secrete),
蜜 (honey),
谧 (quiet) - a tight phonetic family. Adds faint semantic weight too:
必 means 'must, certain', and a
秘密 (secret) is something that absolutely must not leak.