D7 in the key of Bb major?
[responsivevoice_button]
Why is there a D7 chord in the key of Bb Major? Answer : because you’re actually in G harmonic minor! 😜 👍
If you take a harmonic minor scale and build chords over each scale degree you’ll notice that the D chord is now major and not minor as it would be over the G Natural Minor scale. The reason for this is that you’ve raised the 7th scale degree of the natural minor scale to make it a harmonic minor therefore every chord that contains that note is now changed. The same applies to the Melodic minor scale as you are now raising both the 6th and 7th degrees on your way up the scale and lowering them again on the way back down (to the natural minor again).
But there are other ways to explain the D7 chord. It really just depends on how you understand it best so that it can be reproduced. If you had to instruct someone else to reproduce it you’d have to decide on how you need to explain it for the other party to understand what you need but how you choose to understand it is up to you if you are composing music.
Theoretically you can just say that D7 is a borrowed chord and you can play a D Mixolydian over that chord and still wouldn’t be wrong.