Though traditionally used as a way of imparting young beer with an aged flavour, there were other reasons for blending. Principally, as a way of disposing of otherwise unsaleable beer. From the description below, it sounds like this was a tricky process:
"The process of mixing beers is technically denominated 'marrying' them. This process is seldom attempted with mild ales, but with the more hardy beer called porter, it is very generally practised. Mild beer is now become the order of the day; and old beer, excepting when mixed with new, is seldom drunk. The uncertainty of brewing, the reasons of which we have attempted to explain, occasions a great deal of beer to be returned by the publicans to the brewer, principally in summer. These returns are stowed in vats, where they are allowed to remain until they are thought to be in a fit condition to be mixed with mild new beers, the only way by which they can be got rid of. This is occasionally done by breaking the old beers into the gyle-tuns with the worts, while in a state of fermentation, which is a very dangerous mode of working: for if the fermentation should be in the least degree languid, the addition will make it more so, and the whole gyle, or brewing, will be unfit to be sent out. This injudicious plan has sometimes been followed to such an extent, as to block up the brewer; that is to say, he at last accumulates such a quantity of unsaleable beer, as not to leave room for brewing any more, until, perhaps, he has been obliged to turn some of his stock down the kennel. Others break their old beer into the breaking batch (or vessel into which the porter is run before being pumped into the vats) with the mild beer. This mode of working may also be unsafe; for unless the fermentation has been vigorous and healthy, and the old beer brought into a fit state for mixing, no combination will take place; the beer will retain a double flavour, and be occasionally unfit to be sent out, unless by being brought into proper condition, and again mixed off with mild beer. From the above remarks, it will be seen that marrying or mixing beers is a very dangerous process, unless when thoroughly understood by the operator.
Old beer can never be in a proper state for mixing off, unless when brought round (as it is called) for that purpose. This can only be done by again bringing it into a state of fermentation in the vat: after which, if properly treated, it will generally become bright and sparkling; that is to say, if it has not got so bad as to be totally irrecoverable, or unfit for use in any way excepting in making blacking. It will then at once combine with any sound mild beer, and instead of injuring, will improve the flavour. Judiciously to bring on the above-mentioned fermentation in the vat, and at the same time so as not to carry it too far, requires a good deal of skill, and can only be accomplished by those who have been accustomed to such management. Where the process of fermentation is properly and scientifically conducted, these artifices, rendered necessary generally, by neglect or ignorance, will seldom be required."
"A practical treatise on brewing" by William Black, 1866, pages 139-141.
Least you think such practices belong to the dim and distant past, such recycling of returned beer was still common as recently as the 1970's and 1980's. The old system of taxation - basically on the wort before it was fermented - encouraged brewers to recover as much waste beer as possible. Brewers were allowed 6% wastage from the brewing process. If a brewery could get the actually wastage figure below this, they could effectively get some beer free of tax. The returns were usually recycled in a beer like sweet Stout, where a lorryload of caramel and sugar could hide any nastiness.