Stays unsecured in hotel. Unless it's hotel in sketchier countries, then it goes in safe. (which, TBH, is still unsecure)
In really sketchy places I might walk around with a photocopy. Though I always have a phone with me and a digital copy on the cloud.
Never needed to produce a passport except on 2 occasions:
-revisiting the USA, was denied a beer, in the dead middle of a day, at a ski resort, because my EU driver's license and EU residence card, wouldnt suffice. didnt expect to need to carry passport around in my native country.....
-ignorantly but successfully crossed schengen-croatia and back with a photocopy and some sweet-talking.