Optimality models collapse the vagaries of genetics into simple trade-offs to calculate phenotypes expected to evolve by natural selection. Optimality approaches are commonly criticized for this neglect of genetic details, but resolution of this disagreement has been difficult. The importance of genetic details may be tested by experimental evolution of a trait for which an optimality model exists and in which genetic details can be studied. Here we evolved lysis time in bacteriophage T7, a virus of Escherichia coli. Lysis time is equivalent to the age of reproduction in an organism that reproduces once and then dies. Delaying lysis increases the number of offspring but slows generation time, and this trade-off renders the optimum sensitive to environmental conditions: earlier lysis is favored when bacterial hosts are dense, later lysis is favored when hosts are sparse. In experimental adaptations, T7 evolved close to the optimum in conditions favoring early lysis but not in conditions favoring late lysis. One of the late lysis adaptations exhibited no detectable phenotypic evolution despite genetic evolution; the other evolved only partly toward the expected optimum. Overall, the lysis time of the adapted phages remained closer to their starting values than predicted by the model. From the perspective of the optimality model, the experimental conditions were expected to select changes only along the postulated trade-off, but a trait outside the trade-off evolved as well. Evidence suggests that the model's failure ultimately stems from a violation of the trade-off, rather than a paucity of mutations.