During the Great War, Celestia banished Nightmare Moon to the moon for a thousand years. Though Celestia predicted this would stop the uprisings of Nightmare's supporters, they continued. Action had to be taken for the well being of all the ponies, for harmony to be restored in Equestria.
The Dream Realm is supposed to be sacred. A new law was put in place after the Great War to make sure of this. My sister, she was first to break this law and has payed the ultimate price.