The extra black wire is likely a travel wire to the other light. The switch
should turn them both on.
Glad you mentioned you're going to replace that box, as all that rust is not good for getting a ground (someone else mentioned the ground wire needing work).
It never ceases to amaze me the absolute rat's nest of wiring I come across in houses (yours isn't all that bad, actually).