  We develop a cosmological model for the evolution of dust grains in galaxies
with a distribution of sizes in order to understand the origin of the Milky Way
dust extinction curve. Our model considers the formation of active dust in
evolved stars, growth by accretion and coagulation, and destruction processes
via shattering, sputtering, and astration in the ISM of galaxies over cosmic
time. Our main results follow. Galaxies in our cosmological model with masses
comparable to the Milky Way's at z~0 exhibit a diverse range of extinction
laws, though with slopes and bump strengths comparable to the range observed in
the Galaxy. The progenitors of the Milky Way have steeper slopes, and only
flatten to slopes comparable to the Galaxy at $z \approx 1$. This owes to
increased grain growth rates at late times/in high-metallicity environments
driving up the ratio of large to small grains, with a secondary dependence on
the graphite to silicate ratio evolution. The UV bump strengths depend
primarily on the graphite to silicate ratio, and remain broadly constant in
MW-like galaxies between z=3 and z=0, though show slight variability. Our
models span comparable regions of bump-slope space as sightlines in the Galaxy
do, though there is a lack of clear relationship between the model slopes and
bump strengths owing to small scale fluctuations in the bump strength. Our
models naturally produce slopes for some non-Milky Way analogs as steep as
those of the LMC and SMC in metal poor galaxies, though notably the bump
strengths are, on average, too large when comparing to the Magellanic clouds.
This owes to the fact that we evolve the grain size distributions of graphites
and silicates simultaneously, which is an oversimplification. Our model
provides a novel framework to study the origins and variations of dust
extinction curves in galaxies over cosmic time.
