Let us look at it from a Cognitive Behavioral Approach.
What the Quran says is about how Behavior impacts cognition. As a behavior becomes a habit, your cognition (thinking and self talk) starts to justify it or simply not care. That is how the 'heart is turned away'.
However, it does not mean everything is hopeless. All can be changed if you are motivated enough. This is not Allah's injustice, but it is the way human beings have been created. Our struggle against this is our 'inner fight' , it is our purpose.