@AshlynM Good question, that perplexes many a theory-student of mine!
It is most specifically related to trying to be as true to the rules of the key signature as possible… In the instance you refer to, the A in the key signature is probably already flat, and the note receiving the double flat needs to the fourth in the scale (for example) to technically be correct.
Take the major scale: it always follows the tone-tone-semitone tone-tone-tone-semitone rule, regardless of what note it starts on. In a scale, each letter name has to appear, so double sharps and flats are needed in the key signatures that have a higher number of flats and sharps. The key of F major has one flat – the Bb. But if you look at F flat major, where every note is flattened compared to F major, then you end up with Bbb.
Yes, musicians will play the Bbb as an A on their respective instruments, but to the composer they will be playing a Bbb.
At the risk of getting too technical, enharmonics (two different note names sounding the same note) are used a heck of a lot with the harp (my personal speciality). A concert harp has 7 pedals, one for each note name. Each pedal can make the note either flat, natural or sharp. So on the harp it is possible to have a C flat, when the string I am plucking is still the C string. C flat, of course, sounds like a B natural. So I can have two strings next to each other on the harp that are making the same sound. If I then also do an F flat with E natural, and maybe stick in a G sharp and A flat, I’ve changed the number of different sounding notes that my harp can make. When I then play a glissando (where I touch all the strings quickly one after the other) you get the typical dream sequence music from the old films!