Ever since Twilight used dark magic she has wanted to study how it works. But order from the princess herself is to NOT use dark magic again. Her curiosity was too much for her and she ended up trying to study this unusual magic. She should have listened to Celestia.