The classification came about thanks to Napoleon III, who ordered a group of wine brokers to come up with a list of the best Bordeaux in time for the Paris Exposition, a sort of national trade fair.
WSJ: Getting to the Bottom of Bordeaux Wines | On Wine by Lettie Teague