There's a bit more detail in his book but this first resonated with me when I read Scott Adams' "How to Fail at Almost Everything and Still Win Big: Kind of the Story of My Life".
Personally, I don't really think of it as goals and habits being mutually exclusive. Specifically, I wholeheartedly agree with your comment, "The only way to know which habits to cultivate (or rely on) is to have a desired result in mind."
Here are some of his blog posts on it:
https://www.scottadamssays.com/2013/11/18/goals-vs-systems/
https://www.scottadamssays.com/2014/01/21/goals-are-for-lose...
Personally, I don't really think of it as goals and habits being mutually exclusive. Specifically, I wholeheartedly agree with your comment, "The only way to know which habits to cultivate (or rely on) is to have a desired result in mind."