c. 1200, "man ordained in the ministry, a priest, an ecclesiastic," from Old English cleric and Old French clerc "clergyman, priest; scholar, student," both from Church Latin clericus "a priest," noun use of adjective meaning "priestly, belonging to the clerus" (see cleric).
Modern bureaucratic usage is a reminder of the time when clergy alone could read and write and were employed as scribes and account-keepers by secular authorities. In late Old English the word also can mean "king's scribe; keeper of accounts." And by c. 1200 clerk took on a secondary sense in Middle English (as the cognate word did in Old French) of "man of letters, anyone who can read or write."
This led to the senses "assistant in a public or private business" (c. 1500), originally a keeper of accounts, also "officer of a court, municipality, etc. whose duty it is to keep its records and perform its routine business" (1520s), and later, especially in American English, "a retail salesman" (1790). Meaning "an employee who registers guests in a hotel" is by 1879.