It's modulating ... or at least changing modes between C major and C minor, a commonly used thing. Changing between parallel major and minor keys. You can also see this as a movement of tonic by +/- 3 semitones, if you think Eb becomes the tonic in the three-flats parts. The chords could even be seen as diatonic, just in different keys. There are different (justified) opinions on whether a change between parallel major and minor keys should be called a "modulation", because the home note stays the same in such a change.
The modulation sounds interesting, because it makes you re-think and re-imagine what's happening. "It's a cat!" "No, it's a dog!" "Now it's a bird!?" "It's Superman!"
The chords do not explicate all notes of the scale, so they leave room for imagination and soloing. And even if you play and explicate all the notes you're imagining, the memory of the key from the past few seconds is still in your mind and you're in a state of re-thinking. The new harmonic context needs some time to settle in, and the feelings during the settling-in time is part of why modulations sound fascinating.
In the picture above, I've written out key signatures denoting scales you might be imagining. See video at the bottom for an audio example. That's not the only way to see it though, you might imagine e.g. C mixolydian harmony (1 flat) over the C major, or Eb lydian on the Eb (2 flats). On the Dm you could imagine a lot of things.
Michael Curtis suggests in a comment that declaring these changes as separate keys is a bit questionable, because the time spent in each "key" is so short. And of course, one wouldn't write key signature changes for these, because in 4/4 you would have two key signature changes in a single bar. (Which is why I wrote the illustrations in 2/4) But in my opinion, even during those brief moments you have to have a means for reasoning and handling the situation. The only way is to try to keep up with the change and act in each moment as if that was "home", while thinking about the next temporary home already. Papa was a rolling stone, wherever he laid his hat was his home.
To understand what's happening in the harmony, try these variations:
In the second picture I just wrote Cm in place of the other chords. Does it still carry some of the characteristics of the original?
In the third variation, I replaced the C majors with C minors. Now it's kind of doing the same thing as the original, but in a slightly more predictable or boring way. The settling-in and re-thinking of the modulations is missing! The only hint of that is the Dm7, which has an A note (when in natural Cm it should be a flat Ab). If you replace the Dm chord with Dm7-5 i.e. D half-diminished i.e. Fm6/D, then even that little bit of ambiguity is removed.
In the fourth variation, I've written out the missing G dominant chord that leads to the next C-based chord.
If we make the Gm7 a "proper" G7 dominant seventh and replace the Dm7 with a D half-diminished seventh, we get the ultimate version with all ambiguity removed:
Here's an audio example, how I think the key or mode changes work in this chord progression: