my friend who lives in Trondheim is from the same town as me.
some time ago, he received a big fat envelope in the mail from the municipal administration there.
it was a survey. they wanted to know why he had moved away. many smaller municipalities out in the districts are being slowly depopulated as people move to the cities.
he joked that he should have replied "because i'm gay". you can't live a gay lifestyle in a place like that. it's too small and conservative.
also, there aren't really any good jobs there. even if you find one that's a good fit for you, it's likely to be with the only place in town that needs people with your qualifications, so there is zero job mobility.
there isn't much the local government can do to change this, especially with their modest budget. they can't force anyone to stay.
it becomes a negative feedback loop on multiple levels. the people who lack dreams and ambitions stay there. all the interesting people leave, which makes it less attractive to interesting people. the place doesn't grow, and because it's not growing, people don't come there, so it doesn't grow, etc.