From Middle English -lok, -lak, -lac, from Old English -lāc (suffix denoting activity or action), from Proto-Germanic *laiką (“play, sport, fight, activity”), *laikaz (“game, dance, hymn, sport”), from Proto-Indo-European *leyg- (“to bounce, shake, tremble”).
The etymology of the suffix is the same as that of the noun lāc "play, sport", also "sacrifice, offering", corresponding to obsolete Modern English lake (dialectal laik) "sport, fun, glee, game", cognate to Gothic laiks "dance", Old Norse leikr "game, sport" and Old High German leih "play, song, melody" (> Old French lai "song, lyric, poem, lay"), obsolete or dialectal German Leich. Old English līcian ("to please", Modern English like) is from the same root. In modern English, the noun has been reintroduced through the cognate Swedish lek as a specialist term referring to mating behaviour.
-lock