In the early days of western history, when the towns were lawless and life was cheap, the citizens needed men with courage who carried guns to tame the wild streets. These lawmen were recruited from the ranks of gunfighters that roamed the west.
When no one else would step up to the task of bringing criminals to justice, these gunfighters did. They used guns as the tools of their trade. Hence, the original lawmen were born from Gunfighters.