The affix "ilo" makes the instrument out of the verb.
Ŝlosi = to lock - Ŝlosilo = locking tool, tool used when locking = key.
The etymology is a bit weird because the word for key in many languages describes the other function of the key "opening".
But to open a lock you need to lock it first with a key. The question now is which came first? The locking or the unlocking :)
Lack of root overlap is not a design goal in Esperanto.
"razeno" and "gazono" both mean "lawn", for example - one based on a German root, one on a French root. (PIV marks the first as "to be avoided", but this may simply be French bias on the part of the editors.)
malsanulejo - kuracejo - hospitalo - kliniko is another group of words with tightly related meanings.