Traditional principles in operations management and organizational theory suggest that standardizing assignments of tasks to individuals can have substantial benefits and boost performance. However, in various organizations including hospitals, individuals are not forced to follow recommended assignments, and thus, deviations from routine task assignments are often observed. This is due to the conventional wisdom that professionals should be given the opportunity to use their discretionary judgement and deviate from routine assignments when they perceive it to be advantageous. It is unclear, however, whether and when this conventional wisdom is true. We use evidence on the assignments of generalist and specialists to patients in a children’s hospital, and generate insights into whether and when hospital administrators should allow providers to use their discretion to deviate from routine assignments. To perform our analyses, we identify 73 top medical diagnoses and use detailed patient-level electronic medical record (EMR) data of more than 4,700 hospitalizations. In parallel, we conduct a carefully-designed survey of physicians and utilize it to identify the routine provider type that should have been assigned to each patient. Using these two sources of data, we examine the consequence of discretionary deviations from routine provider assignments on three sets of performance measures: operational efficiency (measured by length of stay), quality of care (measured by 30-day readmission rates and rate of adverse events), and cost (measured by total charges). Taken together, our findings suggest that allowing providers to use their discretion in order to deviate from routine assignments is beneficial for task types (patients’ diagnosis in our setting) that are either (a) well-defined (improving operational efficiency and costs), or (b) require high contact (improving costs and adverse events, though at the expense of lower operational efficiency). For other task types (e.g., highly complex or resource-intensive tasks), we find that routines should be enforced: deviations are either detrimental or yield no tangible benefits. Our findings also establish a no free lunch theorem: while for some task types deviations are beneficial regarding some performance measures, they simultaneously degrade performance in terms of other dimensions. Finally, by comparing deviations during weekdays and weekends, early shifts and late shifts, and high congestion and low congestion periods, our results shed light on some environmental conditions under which discretionary deviations are invoked more in practice.