We combine personnel records of the United States federal bureaucracy from 1997-2019 with administrative voter registration data to study how ideological alignment between politicians and bureaucrats affects turnover and performance. We document significant partisan cycles and turnover among political appointees. By contrast, we find no political cycles in the civil service. At any point in time a sizable share of bureaucrats is ideologically misaligned with their political leaders. We study the performance implications of this misalignment for the case of procurement officers. Exploiting presidential transitions as a source of \within-bureaucrat" variation in political alignment, we find that procurement contracts overseen by misaligned officers exhibit greater cost overruns and delays. We provide evidence consistent with a general \morale effect," whereby misaligned bureaucrats are less motivated to pursue the organizational mission. Our results thus help to shed some of the first light on the costs of ideological misalignment within public organizations.