Your interpretation is correct. The relative pronoun "what" refers to the reason for being here.
The verb "to owe" works well with both a direct and an indirect object. In this sense it acts like the verb "to give". For example,
"Jim gives a dollar to Bill"
"Jim owes a dollar to Bill"
So you can ask
"We owe the pleasure to what?"
though it sounds more natural to put the interrogative at the beginning of the sentence:
"To what do we owe the pleasure?"