Freedom of expression is an important human right, but so is the right not to be discriminated against. Nobody wants to be discriminated against or excluded because of whatever happens to be their background, skin colour or religion. The ban on discrimination is at the heart of our human rights, too.
What if you discriminate against someone by making a certain remark in public? You should be able to say whatever you want, but where do we draw the line between freedom of expression and the ban on discrimination?
Generally speaking, freedom of expression comes with some restrictions. For example, you may not randomly disclose company secrets (such as customer data or a production process) or military plans of the government. And in a state of emergency or war, the government may restrict the free expression of its citizens.
You are not allowed to badmouth other people or spread lies about them either. And you must not incite people to violence, discrimination, or murder. If you do, you are punishable by law - in most countries. A court may therefore convict someone for inciting discrimination.
Although the line between discrimination and freedom of speech is not always clear, there are guidelines and agreements in place that help us find it.