Any portfolio drifts over time. For example, if you set out to have a portfolio that was half shares and half bonds, then if, over time, shares doubled in price while the bonds stayed the same price, then you'd end up with far more shares, and potentially a far riskier portfolio than you intended. That's an extreme example, but it shows how rebalancing can help maintain a target level of risk for a portfolio.
If you didn't rebalance then on day one, you'd have a portfolio exactly as intended, but then over time it would drift due to market movements, and your portfolio, after a few years, would likely become more a reflection of market movements than the original plan.
This is where rebalancing comes in, rebalancing can bring a portfolio back to its original plan and reduce the impact of the ups and downs of the market. This is important because although the moves of the market may be random, they may cause a portfolio to be more or less risky than intended. Or, in certain cases, cause the expected results to be lower than the initial plan.
Buy Low, Sell High
Generally, rebalancing involves selling assets that have risen in price and buying those that have declined in price. Doing this means that a portfolio comes back into balance. Some studies have suggested that rebalancing may also help improve performance depending on the market environment, if that happens it's a bonus. The main goal of rebalancing is to make sure that portfolio risk doesn't become too high.
Rebalancing is something that automation handles very well. Whereas the process can be potentially costly or error-prone when done manually, the combination of fractional trading and rebalancing can help keep your portfolio in check over time.