Both the prefix means the same thing eccentric - outer center vs external - outer all in all they means the same then what is the difference here?
According to the information at the link below, they both mean the same: 'outside' - however the 'ex' version is used before vowels, and the 'ec' version, before consonants.
The origins are also different - which is why they are different, in English - the ex is from Latin and Greek, the ec from Greek - so that's another reason for the seeming 'lack of logic' here - that they came from different countries and languages originally.
Eccentric is a Greek loan word, so it uses ec.
Exit (the way to outside)
Ectopic (outside the womb)
Eccentric (outside the norm)
Please see Janus Bahs Jacquet's comment below for a much more erudite and accurate description of how ec and ex are affected by surrounding letters.