Shouldn't I do whatever it takes to gain their trust and friendship?
That depends on the price you're willing to pay. Are you planning to gain these prizes with hard work and dedication? Then good luck - alas you won't need it.
Or are you planning to take the easy route (i.e. ass kissing)? No one respects sycophants, so that's just a safe way to fail. But it's tempting to try.
"This guy is a complete idiot and waste of time. Why are you even keeping him? You should fire him and increase all our salaries! Hahaha!"
People say stupid things, especially when drunk or among friends. It's true for your high-school buddies and it's also true for the powerful. It's a way to socialize, to create an in-group (specifically, it's a way to draw a border between "us" and "them").
If it happened once (i.e. someone just slipped), I'd approach that person specifically in a non-threatening setting (i.e. low-stress, no hierarchy, no witnesses) and tell them "You said 'xyz'. I felt bad about it." Be as specific and as unemotional about it as you can.
That way, the offender gets a chance to see how someone else sees them behave. Without threats, they will be more likely not to start defending themselves and instead start thinking whether this was what they wanted to achieve.
If it's a pattern and many people are involved, chance are you found a pool of corruption. Literally, people can be corrupted when a superior uses insulting terms to describe others over and over again. It erodes morale on all levels (superiors start to look down on "them" and "them" will eventually notice they are perceived as sub-human and respond accordingly).
The Milgram experiment is an extreme form of this. It demonstrates how you can take a normal, average person and make them kill another human being within less than an hour.
The same underlying psychological rules govern human groups and it's imperative that you're aware of this. This form of corruption / bullying looks like fun but it's as corrosive than any other when not kept in check.
So while a retort like "I thought we paid you to solve problems like that? If you can't even fire a 'complete idiot' - using your own words - why are you here and wasting our time talking bullshit?" would feel good (for a few seconds), it's no solution.
Unfortunately, there is no simple solution (otherwise, we wouldn't have problems like this). But there are some things that you can try.
Does your company have a document about work ethics? If so, you might mention it: "I'm sorry, but I feel that comment violates the ethical standards that we have in this company". Tone that down or up as appropriate for the situation.
The important points are:
- Someone with a lot of power made those rules (not you)
- Everyone signed them (so they can't say they didn't know)
- Highlight the fact that these rules are important (not only in your eyes)
- You're just reminding everyone (which really shouldn't be necessary)
If the pattern persists, despite your efforts, then you must leave this place. I'm serious: Quit as soon as you can. Only a small portion of people is immune to an influence like this (they are immune because they are always aware of it happening which gives them a chance to fight it). Give it time, and it'll become one of your habits.