Why do I have to backup a transaction log twice for it to shrink?
SQL Server's transaction log files are made up of Virtual Log Files (VLFs). When you shrink a log file, it will only release unused VLFs at the end of the file. There is always going to be at least one VLF that is being used for current activity.

Consider this simplified example. You have a Log file that is made up of 6 equally sized VLFs. For simplicity, let's say 1 VLF = 1MB, so the total log file is 6MB. You want to shrink it to 3MB. You perform a transaction log backup, which makes some VLF (we'll pick 4 at random) active, and the rest available for reuse:

1____2____3____4_XX_5____6____


Now you perform a shrink with a target size of 3MB. Shrink can only lop off the unused VLFs at the end, but cannot go all the way down to the target size of 3MB:

1____2____3____4_XX_


You can't shrink any further, because VLF 4 is in use, and that's just how things work. You need VLF 4 to be available for reuse before it can be truncated.  So you take a second transaction log backup--VLF 4 gets backed up, and VLF 1 becomes the active VLF:

1_XX_2____3____4____


Now, you can perform a second shrink, and get the transaction log down to the target size of 3MB:

1_XX_2____3____