I also have never heard of a cold sore in ones mouth, this is usually a canker sore or an ulcer. If you can get it confirmed as a cold sore then there are many reasons it could have come "about", but usually because of the following:
Acidic body
Stress
Low immune system
Not enough Lysine (Needed to prevent the virus replicating and traveling)
Too much Arginine (Needed for the virus to travel and replicate)
Hope this helps!