I have multiple ideas as to how the practice ultimately works.
1) "Super Insight". One gains super insight after which negative qualities automatically cease and never arise. The problem is, If one already believes in anicca, asubha, dukkha, anatta, then what is this super insight?
2) "Strong arm tactic". One realizes the drawback of negative qualities and trains to resist them. Of course the reason why it is difficult in the beginning is because of strength of habit and one needs to build a new habit.
3) "Moment to moment understanding of anatta". Since there is no self, then whatever mental&physical states arise (good or bad), there is no one to control them so that one should merely not cling to them and don't consider them to be "mine". If there is no considering them as "mine", then they don't affect one.
"Life is a struggle. Life will throw curveballs at you, it will humble you, it will attempt to break you down. And just when you think things are starting to look up, life will smack you back down with ruthless indifference..."