The earliest versions of Standard Schnauzers were the result of crossbreeding Black Poodles and Gray Spitzes in the Middle Ages beginning the small-sized gene in their DNA. The Miniature Schnauzer is the result of selectively breeding the smaller Standard Schnauzers (already carrying the smaller DNA gene) with Poodles and Affenpinschers to bolster the gene again. Mini Schnauzers carry the genes to be of a small size from their very first days! Toy Schnauzers and Teacup Schnauzers are bred to continue this small size. They are genetically still Miniature Schnauzers. The "Toy" and "Teacup" labels refer only to their estimated size in adulthood.
Where the Miniature Schnauzers foundation was laid to breed smaller, Giant Schnauzers worked the opposite direction. By breeding large Great Danes and Rough-Haired Sheep Dogs with Standard Schnauzers, the gene for size and strength was encouraged giving the Giant Schnauzers so loved today!