On one side of the question, freedom of expression and freedom of inquiry are the foundations of academic life. The only way to increase human knowledge is to push boundaries of things not investigated before. Part of making way for new ideas often involves challenging old ones. Thus tenure for university professors exists to protect academic freedom and to ensure that scholars are free to conduct their work without fear of reprisals. For example, the students and professors, especially Marc Edwards, who helped the people of Flint by bringing their expertise to bear on water safety needed to be protected from reprisals by government officials, and especially those appointed by Republican Gov. Rick Snyder who had a strong interest in covering up the dangerous levels of pollution in the Flint water. If government officials could simply fire professors who revealed uncomfortable truths, much important research would not be conducted.
There are, however, certain cases in which academic freedom to speak and publish should be restricted for the greater good. An obvious example is when it disrupts learning. A few years ago, for example, I was teaching a large lecture class and three students in the front row were talking to each other loudly about a party they were planning. In this case, their freedom to talk about their social life was interfering with other students' ability to learn, and I requested that they be quiet or leave the classroom.
I also will not permit obscene language in my classroom, as it is disrespectful, and can make people uncomfortable. Also, as I am teaching students how to conduct themselves in an adult world of jobs, it is part of my job as a teacher to let students know that dropping f-bombs in every sentence is not a career-enhancing move.
The next issue has to do with hate speech and terms that insult people on the basis of race, class, gender, religion, or sexual orientation. Although too much censorship will stifle free speech, I think there is a more positive classroom environment when people disagree politely and respectfully. For example, in discussing religious beliefs, rather than a students saying "You are a #$%^& and will rot in Hell for that", they should raise a disagreement more politely by saying "In my religious tradition, many people believe that X is a mortal sin. How would people in your religious tradition address this issue?" This way students can express their ideas without being offensive and have an educational experience of exploring ideas that differ from their own in a civil, rational fashion.