I like all your other answers :) It's complicated!
I personally feel that it is all about mimicry. Like birds, some of us can do it and others can't. Some of us can do it in some languages and not in others.
My mother tongue is English and due to my father's airline job, we lived in many different countries. My 1st foreign language at age 5 was Arabic (which I subsequently forgot), then Dutch, which I forgot and re-learned by myself after many decades, then French, German, Italian and Spanish.
When I speak French, people think that I am French, except on some days, like the morning after the night before and somehow, the "taint" of English pops up. I live in France.
When I was working in Holland and had re-learned my Dutch by myself, most people thought I was Dutch but some very astute people would ask me what part of Belgium I was from because to them, I had a French accent!
My German suffered a similar fate as I had a French teacher and although I was not as bad as some of my classmates (because of the English), people thought that I was French.
My Italian and Spanish have never been "main" languages to me and I know I do have some sort of (probably bad) accent to native speakers.
I think that my French is good because I went to French schools with French students. What I do find weird is that whilst speaking Dutch, I have a French accent. And I used to speak Dutch as a child before even learning French. How did that come about? Enigma.
Another thing, I change my accent (unconsciously, people have pointed it out to me) if I'm with a group of Americans or Britishers. I don't sound like them exactly but there are different intonations and expressions and apparently, I just adapt myself to them..
I don't actually agree about the success of people striving to keep their stiff upper lip accent no matter what. A lot of people just get taken over by their new community and before they know it, they're speaking "local". It is a relatively small group of die-hards who refuse to integrate, mentally, emotionally and therefore, linguistically.