I know that a lot of the work in Reconstruction was undone after 1877, but why pass a blanket ban on Confederates holding office and then write a blanket amnesty four years later?
The Amnesty Act was more focused on the actual troops rather than elected officials. Secessionists from the 36th and 37th Congress were explicitly excluded from the Act.
The 14th Amendment was passed to guarantee federal enforcement of Lincoln’s Reconstruction goals. Andrew Johnson was impeached in 68, largely because he did little to punish the South for the war. The result was a power vacuum that ceded control right back to secessionists in Congress almost immediately. The Amnesty Act fixed this problem.