I think the interaction between the judges and the host are contrived and just to make "good tv". I think there's a bit of ad libbing that goes on, but for the most part I think it's just an act by each and every one to give us a show. It's all so stereotypical--the good judge, the bad judge, and the one the moderates the other two. Now, Ryan Seacrest can't be as dumb as he plays or he wouldn't be where he is today. All an act, nothing more or less.
Now, as to the comments to the contestants--the judges, I would think, see them in rehearsal and have a pretty good clue how they will perform week after week. Simon is just more forthright with his opinions (and probably goes a bit overboard at times) to get the crowd into it and we at home viewers to vote.
It's just television. . .I love the show, but am certainly not embarrassed by Simon and Ryan's verbal jousting.
Now, when it comes to those fools that perform on shows like the "Uncut, Uncensored, and Untalented". . .I am embarrassed for people like William Hung. When I wonder why they do it, the answer is clear--$$$$$$. It might be worth a bit of public humiliation for that kind of capital!

Just not sure I could do it. . . To me, that's painful to watch and I do feel sorry for those contestants--at least some of them.