She did it because she understood that the greater good was more important than her own life. Her freedom might have been important, but saving other was something bigger than her. She believed that it was better to save many of them instead of just life satisfied that you're not a slave.