I think when it came down to it, this was one of his hardest decisions, because his favourite two were in the bottom (showing how out of touch with the public they apparently are)... and he HAD to choose.
He couldn't do it based on the performance of the night. The big problem was that the public has not caught on to Rachel. She was in the sing-off for three weeks, showing her unpopularity week after week. Yes, Sam got the lowest vote this week, but had never been in the bottom before.
He was never going to send Sam home on her first time in the bottom, whereas Rachel (fantastic and talented though she is, and very suited for the role), as far as the public were concerned, had 'overstayed her welcome' and had to go.
Shame though, big shame.