Nice observation. There are four ways in which we can be used.
In your example.
what do we have here
, it can be anything from given four options. It depends on the context.
Whereas,
do we have a problem?
it is a condescending "we".
There are four ways:
- Condescending we (Oxford Dictionaries)

- Nosism: A nosism is the use of 'we' to refer to oneself. Nosism, from the Latin nos, "we", is the practice of using the pronoun "we" to refer to oneself when expressing a personal opinion.
a). Royal "we"
Example:"By the Grace of God, We, Alexander I, Emperor and Autocrat of All the Russias ...."
b). Editorial "we"
Example: We are sorry to publish this news article.
c). Author's "we" or pluralis modestiae
Example: By adding three and five, we obtain eight.
- an inclusive we: inclusive "we" specifically includes the addressee (that is, one of the words for "we" means "you and I and possibly others")
Example: We can all go to the villain's lair today.
an exclusive we: exclusive "we" specifically excludes the addressee (that is, another word for "we" means "he/she/they and I, but not you"), regardless of who else may be involved.
Example:We mean to stop your evil plans!
Wikipedia states that second person usage of "we" (you).
We (as second person): Clusivity in the second person is conceptually simple but nonetheless if it exists is extremely rare, unlike clusivity in the first. Hypothetical second-person clusivity would be the distinction between "you and you (and you and you ... all present)" and "you and someone else whom I am not addressing currently."
There is a beautiful paper on clusivity:
Simon, Horst J. Only you? Philological investigations into the alleged inclusive-exclusive distinction in the second person plural, in: Elena Filimonova (ed.): Clusivity: Typology and case studies of the inclusive-exclusive distinction.
Wikipedia link: Clusivity
what do we have here
is not strictly "condescending we". It can be anything from given four options in my answer.