When entering baptisms and marriages in the parish registers, some priests chose to "Latinize" the first names of the people involved. Samuel was a common way of Latinizing the Irish name Somhairle, which was sometimes anglicized as "Sorley" (a rough approximation of the Irish pronunciation). It was also sometimes anglicized as Charles. Samuel is actually a Hebrew name, of course, but the priests used various Biblical or classical names (such as the Greek name Dionysios for the Irish name Donncha) which apparently seemed more appropriate to them than perfectly good Irish names. At least they didn't normally try to alter surnames.
Some of the latinized forms were never used by the family apart from those events, but some "stuck" and continued to be used, especially in official records (as did many anglicized forms). The name Somhairle is originally of Norse origin, and was sometimes written as Samhairle. It also appears as a surname, Mac Somhairle (MacSorley), and was a particularly common given name among the McDonnell's, especially in Antrim (but also in Mayo), who are a branch of the Scottish Clan MacDonald and have deep Norse roots.