The president wins. The president hands out cabinet positions. The cabinet positions go to the people who helped the president win — donors, allies, loyalists, true believers, and occasionally someone who spent the entire campaign calling for the department they now run to be abolished.