Brass player here with a few months' worth of guitar ability. You're correct about the harmonics being at play, but the mechanism's a bit different.
To elaborate/review, your lips are the guitar strings in this equation, and naturally will behave much like a string on a chamber instrument or fretless guitar (as is obvious from "free buzzing" and mouthpiece buzzing). The length of the tubing then dictates which frequencies will resonate with your lips, meaning your lips will want to "settle" into something in harmonic resonance with that length of tubing.
The key difference here is that your lips themselves are basically "fretted" to the harmonics (though with practice you can bend that quite a bit), since the corners of your lips are moving (slightly; it's a short string!) in and out to go higher or lower (respectively), and since they'll want to vibrate at a harmonic (the vibrating metal and air impart a force on your lips for the same reason your vibrating lips impart a force on the metal and air, so it takes much more effort to buzz against that harmonic than it does to just ride it and keep that feedback loop going). Further, the mouthpiece itself is basically a capo in this context, so your lips are always "fretted" to the mouthpiece's constraints (this is a big part of the reason - if not the entirety of it - why trumpets have tiny mouthpieces and tubas have giant mouthpieces).
I suspect that if you were to replace the body of an acoustic guitar with a really long pipe, you'd see/hear similar dynamics at play: a string tuned or fretted to one of that pipe's harmonics will keep vibrating for a good while, and a string tuned/fretted to something else would stop vibrating sooner as the destructive interference sucks energy out of it. And the former would likely be much more audible than the latter.