Very true!
I will write a story arc for a campaign that records everything with a timeline that doesn't include the PC's. That gives me a baseline to keep myself (and the players more or less) on track for the "big events" and activations of some of the major NPC's.
Then the players get involved in-game and the whole plot (which to me is the most fun part) goes up, down, every which way as the PC's interact with the NPC's and main plot how they want to. Sometimes they go off the rails for months at a time, but at least having it all mapped out for myself I can nudge them back if needs be, as well as have plenty of events generating rumors and news. I keep good notes as we go to keep track of the players' changes to the whole storyline, if any, and also keep notes on ideas the players come up with about what is going on that may not even be correct but will generate side events and more rumors and stuff.
in fact, sometimes the players come up with more interesting and fun ideas about what is going on (depending on the genre this can be suspects, events, cultist activities, bad guy goals and schemes...) than I had originally come up with myself. In those cases I either let them develop the leads to chase down that are true, or even if they are false. And if true - I just toss what I had originally and go with their ideas; rewriting the campaign as I go.
I've had that happen a lot sometimes and it resulted in a lot of off-the-cuff refereeing while I kept a close ear and eye on what the players were doing so I could keep the session going until a good time to. I have a deeply developed ATU so that isn't hard to do that in my Traveller games, but sometimes the actual consequences of their new actions and unexpected directions in the overall story don't show up for a long time in the campaign - so good notes are a must. And even if not useful at the time, this sort of unplanned input from the players can be inserted later as a side adventure for them.
But mainly, what I recommend a lot is at least having the whole story plotted out as if the players weren't going to be in - then let them develop how their actions affect the details and plot as they go along. The unexpected always brings glorious results and you'll be surprised how often it is more fun that way.