The Uffizi Gallery was originally constructed not as a museum, but as offices for the Florentine magistrates — hence its name, "Uffizi," which means "offices" in Italian. Commissioned by Cosimo I de' Medici, the first Grand Duke of Tuscany, the building’s primary purpose was to consolidate the administrative offices of the Tuscan state under one roof, as part of Cosimo’s efforts to organize and strengthen his newly established grand ducal administration.
Beyond this, the Uffizi was also intended to house the art collections of the Medici family, one of the wealthiest and most influential families in Europe at the time. As their collection grew, parts of the Uffizi were gradually used to display these works to a select audience, marking the beginning of its transition to a gallery. After the Medici dynasty ended in the 18th century, the last Medici heiress, Anna Maria Luisa de' Medici, bequeathed the entire collection to the city of Florence under the condition that it would never leave the city. This collection formed the core of the Uffizi Gallery as we know it today, officially opened to the public as a museum in 1765.