Father Steve could deal with this question best I think, but probably the word ‘swear’ in that sense originates with an oath! I reckon that swearing originally was always blasphemous and was therefore the misuse of an oath. So, a serious oath, ‘I swear by God to ....' became ‘By God!’ in a blasphemous usage. So it was misusing the process of swearing an oath. Other, usually four-letter, words that we now call swearing but are scatological or sexual in character were just normal Anglo-Saxon usage at one time! Lately, people have started inventing new words for strange habits and maybe those will become swear words in time. But don’t let’s go there!