Inherited from Old Spanish pecador, peccador, borrowed from Latin peccātōrem. By surface analysis, pecar + -dor.
Practice speaking and memorizing "pecador" and many other words and sentences in Spanish.