Every author should have some structure when they're writing. I'm a big fan of plotting and planning and pre-researching, and I'll advocate writing an outline any time you give me a chance. But sometimes, writing the story takes us off the outline and outside the original plan. When that happens, there's only one thing to do: go with it.
On a Tangent
Things don't always go the way we plan, and that's especially true for writers. When you sit down and outline a novel at the very beginning, it's still just a concept. But things might change as you begin to write.
Stories have a way of taking on a life of their own. As you write that book, you start to really get to know a character. You begin to think like them, see things the way they see them, and sometimes plot points that you planned no longer fit the person you've come to know on the page.
It's good to plan, but writers also have to know how to adjust to those changes. It's okay to let the story take you where it wants to go. Remember that the outline is really just a guideline; it's there to help you get to the end, but if certain things change along the way that's okay. Always go with what you're feeling in the moment. Then go back later and read what you've written. If you're completely off course, bring yourself back on track.
But often, writing in the moment will take you to wonderful places -- places you wouldn't have gone otherwise. Let the book and the characters lead you to those places, and explore them. Going off the outline is okay, because too much structure and discipline will stifle your creativity.