Why is it "das" Madchen and not "die" madchen?
The ending -chen makes everything it is attached to neuter and it gives the expression of something small. It might not look like it, but das Mädchen comes from die Magd (maiden, maidservant) which is female. But even when talking about persons German grammatical genders sometimes don't correspond to the biological gender.
There are other examples like der Tisch (table) - das Tischchen, die Wolke (cloud) - das Wölkchen, der Schrank (wardrobe)- das Schränkchen, der Stuhl (chair) - das Stühlchen, die Schüssel (bowl) - das Schüsselchen. You wouldn't hear many of these in daily conversation. The frequent word I can think of is "das Brötchen" (bread roll/bun) which comes from "das Brot" (bread).