The phrase "of course" is useful to show that you're saying something that's obviously true.
It's also useful in situations like the one above, where you think that people might misunderstand something that you said. For example, imagine that you made a general comment about people from a certain country. You might worry that listeners will think you're racist. So you can say: