Sure, they get their ass handed to them on occasion, but at the end of the day the Empire has been defeated, and they all hang out with Muppets getting drunk on blue milk.
It sends a positive message out to viewers - and I think if one of the main (and most popular) characters had been killed off, it would have damaged the ideals of Star Wars.
Ford only wanted to kill Solo because he was tired of the Star Wars legacy following him around. Even now it looks like pulling teeth just to get him to talk about it. I can understand where he's coming from, but if you want to do something with a character, do it to benefit the story.
Everything in a film should do just that - service the story.
I don't buy the argument that it would have "brought home the horror of war." Well, look, it's not called Real Wars, it's called Star Wars. We already had something to illustrate loss and horror - Empire Strike Back.