A person with a well-developed conscience knows it always is wrong to invade the privacy of another person. Even if Ravi had objected to being asked to leave his room in order for his roommate to privately entertain a guest, Ravi had no right or cause to exploit Clementi.
Moreover, a person with a well-developed conscience is capable of holding whatever opinion he chooses about another person without acting on that opinion. It's irrelevant whether the issue is sexuality or race or obesity or intelligence or gender. You can hate someone because they look at you funny or have an obnoxious laugh or speak with an accent you don't like.
You just can't torment them. That's wrong. It's always wrong, no matter why you do it.
Put another way, there are some things you just don't do.
This is what's known as a moral imperative. Unfortunately, Ravi's moral compass - the thing that should have pointed him toward true north and a path of correct behavior - clearly is as immature as his ultimate course of action.
In the aftermath of such a tragedy, we all ought to learn the moral of a story such as this: It's nothing less than morality itself.