When I was looking through what chords I should use in the key of B minor, I realized that C sharp diminished is one of them. But C sharp diminished has a B flat in it, which isn't in the scale of B minor. Why is this?
When we say C♯ dim. is in the key of B minor, we mean the C♯ diminished triad, which is
C♯ E G. B minor is
B C♯ D E F♯ G A B (note that this is natural minor), and
C♯ E G is within that collection.
But, for what it's worth, that fully-diminished seventh chord is also in the key of B minor, though instead of B♭ the chordal seventh is spelled as A♯ (note that here we're using the harmonic minor collection of
B C♯ D E F♯ G A♯ B). When we realize this, we suddenly spot that the chord is actually an A♯ diminished seventh chord, because when we stack thirds it's A♯ on the bottom instead of C♯.
This is because fully-diminished seventh chords are symmetrical, so we can conceptualize them as having up to four different roots. By symmetrical, I mean that the chord is constructed of three consecutive minor thirds:
E G, and
B♭ C♯ is also a minor third, just spelled as an augmented second. This means that we can conceptualize this fully-diminished seventh chord as having any one of these four roots (and their enharmonic equivalents).