Historically, the Muslim governments, courts and religious leaders are very intolerant of their women, in particular, and all women in general. By Western standards their attitudes are barbaric. By my standards they're abominable. Therefore, by being a female the British teacher already had one strike against her. Being a non-Muslim female made things much, much worse.
The fact that the Sudan needs the aid and support is, in my opinion, why she got off so lightly. The sentences which could have been imposed were much more severe than what she was given. Plus she was released without serving the full term to which she was sentenced, thanks to the hard work of British diplomats. There were some hard-line fundamentalist who were calling for her to be executed.