Tough topic. I'm sure its be debated alot. There really is no hard evidence why he saved one but not the other, other then the obvious that the Joker is usually everyone's favourite villain so that's why the director did not have him killed. I don't think letting the Joker die would have meant the he won. I don't think that a city under siege by a terrorist would have been disheartened by his demise. Furthermore, I don't think Batman would have made an announcement that he killed the Joker and he if had, he would have lost no more "believers in the Bat" then when it gets announced that he killed police officers.
The only thing I can think of, and its purely speculation, is that Batman left Ras to die in a runaway train. With the Joker, it was actually Batman's own hand that reached up and flung the Joker off the rooftop. Perhaps the more personal nature of being directly responsible for killing someone made Batman save the Joker. With Ras, he did jam the train's controls but he didn't tie Ras down in it or knock him out and leave him. He simply chose not to save him.