To add to the good explanation, there is also a limitation with E# and B#
The B-sharp major scale has 2 sharps, 5 double-sharps.
The E-sharp major scale has 3 sharps, 4 double-sharps.
Warning: The B-sharp and E-sharp keys are theoretical major scale keys.
Of course C-flat has seven flats and F-flat has six flats and one double flat.
I would have to look; does BIAB even support double sharps or double flats even in notation (much less the key signature)?