(Photo credit: http://bit.ly/2cV6Eol)
This completely makes sense if you think about it.
You as a student decide to learn English, you start a course, you go every day and study hard and do your homework. Problem is that you don’t have any native English friends and in your class you may have (worst case scenario) only people who speak the same English as you.
Therefore if you are going to try to practice outside with your friends (though I still do suggest this very much if you have no other way of doing it), you may end up finding that your spoken English will be about the average of the 5 of you who sit around talking English.
This may be one of the reasons why learning to speak English is so much harder when you don’t have English speakers around you.
Then there is the other situation where the person goes to say Manchester in the UK and takes up an English course there while they work as a waiter at night in a restaurant. After 6 months of working there and mixing with all the UK staff there, they come back to their country with a strong Manchester accent, which for some (even native speakers from other countries) is very difficult to understand. The difficult thing for an ESL learner though is when they are surrounded by this accent, as far as they know this is the British accent. It is, but it’s not exactly the Queens English let’s say.
So my recommendation is that a student needs to try all of the above, but also to surround themselves during the day (outside class) which a variety of English accents, e.g. listening to an English song, watching an English movie, listening to the BBC news, not to mention trying to join a club that will have a large number of native English speakers.