In the early days of feline breeding, most breeders were under the impression that the colors and variations of the resulting cats was completely random. In their defense, there were literally working with a handful of colors, and nowhere near the variants that exist in the Persian and Himalayan world today. So when a breeder bred two black persians and got a blue persian, it did in fact appear completely random.
Through countless hours, and countless generations of selective breeding, the earlier pioneers of the cat fancy, painstakingly documented everything they knew about the sire and dam of each breeding, and repeated that activity for each kitten. It was in this manner that these fore-fathers and fore-mothers of the Cat Fancy, were able to determine and document how a given kitten 'obtained' it's colors/markings.
As a result of those countless hours, the reality of modern breeding program, is even though the exact specifics of what colors will be produced by any given breeding are in fact truly random (that's just the nature of genetics and breeding), the modern breeder, with a little bit of knowledge and time can accurately predict what color variations, as well as certain other physical characteristics are capable of being produced by a given breeding.Some of this accurate prediction does require initial breedings of a given Sire and Dam to see how their genes interact, but in most cases, just knowing that a Sire and Dam are of a given color, type and variant, as well as knowing the color, type and variant of the their parents and grand-parents, provides a fairly concrete basis for predicting what sort kind of offspring will be produced.
And yes, even today, breeders still get surprised when they breed to black persians and get a blue persian kitten. But the difference is we now truly understand why the blue persian was produced in the first place. And this simple fact has given rise to a whole new hobby within the Cat Fancy; Genetic Line Chasing.
If you're interested in learning more about Feline Genetics, feel free to browse the follwing links.
The first link (Mating Predictions) specifically deals with the cats within our breeding programs. It documents what statistical probability there is of producing any given color cat when pairing a given Sire and Dam.
For the interested, the second link provides an entry-level crash course on how genetics works in felines, with a specific purpose of describing how each of the Loci and alleles within it, are of interest to a color/marking conscious breeder.