where does this chord come from?
A D minor chord in the key of C minor comes from chromatic alteration. The pitches are D, F, and A. But the diatonic sixth degree of C minor is A flat, not A natural. By raising the A flat to A natural, you can obtain a D minor chord in C minor.
However, the chord you're asking about isn't a D minor chord. It's a diminished chord, or perhaps more precisely an extension of that chord. Classical theory calls it a half-diminished seventh chord, because the fifth is diminished but the seventh is not. Notice the "♭5" portion of the chord symbol. This specifies that the fifth of this chord is a diminished fifth above D, namely A flat, which is the diatonic sixth degree of the C minor scale.
I am not sure why jazz theory abandoned, as they seem to have done, the degree symbol for diminished chords and half diminished seventh chords. I (as a primarily classical musician) find Dø7 more concise and easier to read than Dm7♭5. But I'm not in the target audience, so my opinion should perhaps be discounted somewhat.
(Some may want to go into the confusing discussion of whether one is talking about the C natural minor scale, or harmonic minor, or melodic minor. The harmonic minor and melodic minor are best thought of as chromatic alterations of the natural minor scale, consistent with their notation using accidentals. Therefore, even if you prefer to think of D minor as coming from the melodic minor scale, I would still say that it is the result of chromatic alteration.)
One of the oldest chromatic alterations in the books is the raising of the leading tone in final cadences when the diatonic seventh degree of the scale is a whole step below the tonic. This long predates tonal harmony and in fact was one of the main factors leading to the development of harmonic theory. For this reason, one of the basic rules in harmonic theory is that when there's a chord built on the fifth degree of the scale (G in this case) the third is raised if the following chord is built on the tonic (C in this case) -- as well as in some other situations. This gives us a major triad (or a dominant seventh chord). In this case, it gives us G7♭13 instead of Gm7♭13. You could call this "using the harmonic minor scale" for that chord, but either way it is an example of chromatic alteration.