there won't be one, single answer. In France though, for quite some time, it was a hereditary position. The Sansons filled the position of Paris executioner for a number of generations beginning in the late 17th century, and going beyond the Revolution - during which Charles-Henri handled the death of the king himself.
Charles Sanson de Longval had married Marguerite, the daughter of the executioner of Rouen, Jouanne - by his account, Charles didn't know what her father did when he first met her, something which would perhaps have prevented development of affection in the first place as it was considered ignoble for the whole family. Master Jouanne soon after died with no male heir, leaving Charles to reluctantly take up the mantle, a condition he had agreed to out of love for the daughter... who died soon after as well, giving birth to their son. Soon after, he was provided with the more "prestigious" post of executioner in Paris.
The position was passed on generation to generation through the mid-19th century, with almost no interruption; his son took over the job upon his retirement, but in turn died when his own son, Jean Baptiste Sanson, was only seven. He couldn't do the job immediately, but was given the official position after intervention by his mother, and apparently was required to attend executions while they were carried out by an assistant until he was old enough. Far from one heir like his father and grandfather though, Jean Baptiste had seven sons, and soo executions became the family profession, with the various Sanson men appointed executioners in various French cities. Of course though, Paris was the position, and would remain a Sanson family job until 1847, when after six generations of executions, Henri Sanson retired, and the position was filled outside the family.
Roche, Katherine. "Hereditary Hangmen." The Irish Monthly 9, no. 91 (1881): 23-30.
Applbaum, Arthur Isak. "Professional Detachment: The Executioner of Paris." Harvard Law Review 109, no. 2 (1995): 458-86. doi:10.2307/1341979. (This focuses mostly on the period of the Revolution)
Additionally, Henri Sanson edited a collection of the family memoirs touching on the 'saga', which is here.