Well, you see, after the end of Metroid Prime, the titular Metroid Prime is destroyed. Part of it, however, ends up in a pool of phazon and it mixes with part of Samus' DNA to become Dark Samus, who is a bad guy (girl?) in Metroid Prime 2 and 3.
Now, if you want to know why Samus' DNA allowed...