Tell me about a time you had to stand up for your beliefs?

Why the interviewer is asking this question:
This is a “disagree and commit” question. The interviewer is probing how you react to decisions with which you do not agree.

The best approach to answering this question:
Many candidates incorrectly take this as a prompt for a time when you convinced the other person of the error in their ways. The better way to answer the question is to talk about a time when someone else (usually a person in authority) makes a decision with which you do not agree, yet you need to commit to delivering. While you can talk about your contrary position, the bulk of your answer should be talking about how you delivered successfully in spite of not being on board with the initial decision.

An example of how to best answer this question
“Our company recently made the decision to become a government contractor. I disagreed with this decision due to the negative impact it would have on my department and more broadly on the culture of the company. However, once the decision was made by the CEO, I stepped up to lead the implementation of the federal contracting program, since I had previous experience with this at a prior employer…”