Things have a nasty 'habit of not turning out' the way you expect them to. [=things often do not turn out the way you expect them to]
He reached into his pocket for his keys 'by/from force of habit'. [=he did it without thinking because it is what he usually does]
I'm 'not in the habit of' making predictions, but I don't think there's much doubt about who will win this election.
(..) - We have an understanding. - Good. Everything would be out in the open if Corleone dies. Play for time, Keinszig. A habit born of a long contemplation of eternity. - Forget about it, Vinnie. - Why? It's a simple hit. I'd love to smack Joey Zasa and then whack the fag. But it's impossible. (..)1990 The Godfather Part III