You could have the situation you by 100 of A at $10, for $1,000. Then you sell it when it goes up to $15, and after paying fees/taxes keep $250, then invest the $1,000 in B at $10 each. And B craters and you lose all of the value in B.
In that scenario you lost $750. ($1,000 lost in B, $250 gained in profits from A).
Now its true that A could continue on its path to $20, and had you kept it you would have instead made a profit of say $750 after taxes and still have your $1,000.
What I learned in 1999 was that that is not a good strategy. But it is the first strategy that everyone sticks with it seems (and certainly I was holding on to!), "Hey this has doubled in 5 years, in another five it will double again!".
And part of my thinking was "Gee if I sell it I'll have to pay all these taxes, I'd much rather think of my self as having a net worth of $x rather than $0.66x." Lesson learned.