The second part is really the same as the first. You want to be able to spell each diatonic alphabetically in order without skipping any letters of the alphabet. The B major scale is
B C# D# E F# G# A# B
If you tried spelling that with flats, you'd get B Db Eb E Gb Ab Bb B
The skipped C and F, and the double E and B, is just nasty. The same would happen if you tried spelling the scale with a combination of flats and sharps.As for diatonic scales that start on an accidental, as far as I know you can use either the flat or the sharp notation. They are enharmonic equivalents. I know there are often traditional preferences, simply to choose the spelling that leaves fewer accidentals in the key signature. For instance, I think that Db major is more common than the equivalent C# major because the former has 5 flats while the latter has 7 sharps.