I learned most of my English as a Portuguese teen from TV (the main source of exposure to English language I had, as in Portugal everything but kids shows is subtitled, unlike next door Spain were they dub everything) so my accent was mostly this Americanised thing but with some hard consonants because that's the main thing in the Portuguese from Portugal accent (Brasilian-Portuguese has a different accent).
Then I moved to The Netherlands as a young adult and somehow added a bit of a Dutch accent in my English (in The Netherlands I also learned and mostly spoke Dutch, plus mainly spoke with Dutch people even when speaking English, which is probably why I got a bit of it as accent). Also I apparently have an Amsterdam accent in Dutch.
Then almost a decade later I moved to England, and my English-language accent started drifting again, this time towards English RP (same kind of accent as most TV presenters) though with some funny elements such as a bit of a Cockney accent for some forms of swearing, possibly because I was living in London (swearing is fun, and I still naturally mostly in Dutch, for some reason).
I also activelly made an effort so nowadays I can easilly push my English-language accent to almost perfect English-RP, or just be lazy and leave it at my weird natural mess (which still has things like a distorted "ja" instead of "yes" because of Dutch).
Oh, and in all this I've learned how to purposefully speak in various accents in English for fun (though I have trouble with Australian and South African, for some reason), which is apparently pretty hard to do in a second language, though for some things I kinda fake it (for example, if I start thing in French and then just start speaking in English, the English tends to come with a generic French accent)
I think it's to do with how you learn a language: if you just kinda absorb it (for example from TV or living in a place were people speak it) rather than formally learn it, you just absorb the accent along with the words and the grammer (also you pick up all sorts of quirky stuff like words with no actual meaning that are just used to add emphasis, slang, swearing and so on).