The Senate confirmed Pam Bondi to be the next attorney general at a pivotal moment for the Justice Department.