The correct answer is that it is linked to the root source of the word as modified by various dictionary inclusions. Was the root Latin, Greek, was it a verb or a noun, who put it into a Dictionary first, was that dictionary in the UK or in the US of A.
The practical answer is that there is no real rule or logic. Just some vague guidelines with 1000 years of exceptions. When the Normans conquered Briton in 1066 the formal languages spoken by the educated people in charge were French, Latin and Greek. The vast unwashed masses were abandoned to whatever patois they wanted and since there was no formal schooling, the language quickly was stripped of it's complicated rules, unused words and reduced to a bare minimum. Add to the fact that the people were a mixture of several different cultures and you get a mixture of words from a multiple of languages whose meaning often overlap and changed from area to area - a common word in one town would not exist 20 miles away, or mean something else.
It took till the printing press and cheap paper before any real attempt to nail down spellings and meanings was possible, never mind attempted. So for 500 years the language developed independently, and then for 500 years everyone argued about it. How we ever manage to understand each other is a miracle