Why do you have an accent?  Three reasons:  sound rules, sound discrimination, and motor patterns.

Sound rules:

Each language has sounds and rules for combining these sounds.  When we learn a language in school or as an adult, we typically aren’t taught sounds or sound rules.  We learn grammar but not sound rules.  Most speakers learn sound rules from immersion, not instruction.  These sound rules govern what sounds can be combined together into syllables, which sounds can end words, and how to combine words in sentences.

Sound discrimination:

It is difficult to distinguish and “hear” sounds in languages other than our mother tongue.  Babies can distinguish every sound that every language uses.  But, as we get older, we lose this ability.   So even if we want to change our accent it becomes difficult because we don’t know what to change.  We can’t distinguish the mistakes.  If you can’t hear the sounds from the new language, you can’t figure out your mistakes.  So the English learner finds the closest sound in their language and use that.  

Motor patterns:

Making speech sounds involves motor patterns. Swinging a golf club is a motor pattern.  For those of us who started golfing without a lesson, we know it can be difficult to start using a new one after getting instruction.  This is because motor patterns become habits.  Our mouth wants to do what we always do.  This is easy.  When learning a new language, it takes time for the new sound patterns to become habits.  In most cases, it takes daily practice to learn new motor patterns associated with a new language.