The pit can refer to the place of dead people, suggesting the "corruption" of death (17:14; 33:18).
The dirty clothes representing being guilty contrast with the clean clothes representing being innocent (Zechariah 3:3–5; see Isaiah 61:10; 64:6; Revelation 19:8).