Why "but" is used here?
"But" in this case is a conjunction used to show that anything other than what is stated is impossible or wrong. "Of course" is used to reassure someone. "But" is added here to form "but of course" which indicates that the reassuring thing is obvious and shouldn't have been doubted or given attention. "But of course" is a little more formal than "of course". Ex: A: Thank you for your hospitality. B: But of course! You are welcome here anytime.