They sound different because they have a different tonic note -- or pivoting root, which I'm guessing means the same thing? -- C versus D. This would be unimportant if a key/mode/scale was just a collection of notes, but it's not. This is better thought of as a set of seven roles that are each taken by a certain note. Each role is called a scale degree, which has a number and a name. A good lesson from the awesome website musictheory.net explains this: https://www.musictheory.net/lessons/23
The role of each note is described in terms of where it wants to go (where it "pulls" to) and how it is usually used in a melodic line.
- The tonic note (1) feels at rest and often begins a melody. It also often ends a melody that ends on a full cadence. It does not pull towards anything. It's C in C major and D in D dorian.
- The dominant (5) often precedes the tonic, because it pulls toward the tonic. It's G in C major and A in D dorian.
- The leading tone (7) pulls strongly toward the tonic and almost always precedes or follows the tonic in classical music. It's B in C major. Dorian does not have a leading tone because there is not a half-step between the 7 and the tonic, but a whole step. This (flat 7) is called a subtonic, because it is a whole step below the tonic. It pulls towards the tonic, but much more weakly. This is the major difference between ionian and dorian: dorian does not have a leading tone and thus never has that strong of a pull towards the tonic. The subtonic of D dorian is C.
- The subdominant (4) is called this because it is the dominant below the tonic instead of above. It can go either to the tonic (plagal cadence) or to the dominant. It pulls toward the dominant. It is F in C major and G in D dorian.
- The supertonic (2) pulls toward the tonic but, like the subdominant, often precedes the dominant. It is D in C major and E in D dorian.
- The mediant (3) and submediant (6) don't have much of a pull toward a specific note, but still do not feel at rest. These are often used in-between the others, either for arpeggiation or stepwise motion. Therefore, they aren't as useful for defining/establishing the tonality/key. These are E and A in C major, and F and B in D dorian, respectively.