Can someone please help me make sense of why some flat symbols in the key signature are in parenthesis?
A little-known fact is that the historical basis of minor tonality is the Dorian mode. Consequently, much 18th-century tonal music is written in a key signature that seems to lack one flat sign. This is especially common for chorales, since the tunes are frequently from the 16th or even 15th century, when they were unambiguously Dorian.
The parentheses here indicate that the editor has changed the key signature to align with modern expectations. Many editions make such changes without informing the reader.
In minor keys, of course, the sixth scale degree is occasionally raised, which gives rise to the ascending melodic minor scale. In minor keys notated with a Dorian key signature, the sixth scale degree is instead frequently lowered by a half step. In fact, this tendency goes back to the dawn of staff notation. Many medieval melodies in Dorian mode feature B-flat very prominently.
In addition to phoog's statement that Baroque-era music was often written with one fewer flat in the key signature than we'd expect given the tonic (e.g. J.S. Bach's Toccata and Fugue in D minor, BWV 538 "Dorian"), note that no A's or A flats are used in that C minor cadential phrase that uses the key signature with the A flat in parentheses. The editor has put that A flat in the key signature in parentheses because s/he could get away with it - it's not being used.