Let's hope you don't have to get to the bathroom quickly late at night...
Most likely there is some sort of motion or presence sensor that turns on the lights which then turn themselves off after some time or no more presence is detected. There are also small wireless switches that could be used in place of the actual wall switch.
I have done so in my apartment for example. Since the bedroom light switch is for some reason outside of the room I taped it down and put a wireless switch in a more reasonable spot. Another example is the hallway light, which only turns on by motion sensing when the sun is starting to go down.
And even the living room automatically adjusts lights based on the playing status of the AppleTV (playing = dim, pause = brighten up a bit).
Oh and the staircase, haven't found the motivation/courage to climb up 10m to the ceiling to switch out the ye olde light in there :D Maybe this year?
The Living room would need two presence sensors that talk to each other in a smart way (a big room, one isn't enough) and I haven't yet found the semi-manual way of adjusting the lights via phone/Siri to be too cumbersome to bother.
This is the only solution I'm aware of that gets you all of:
* dimmable,
* colour temp and RGB control,
* regular switches that work as expected,
* no "forbidden" switches,
* lights always available for automations,
* lights go on and off with the switch when HA is down.
Depends on your definition of "regular switches," I suppose -- but anyone with 3-way wiring (i.e. multiple light switches for a single socket) has given up on "up=on" for their switch.
* No battery powered devices in walls,
* Lights don't come on automatically following power cut.
If the Shelly relays supported ZigBee direct bind then it would be even better, but with decent ZigBee devices it's not bad with my setup.
There is another option that I don't think many people are aware of: You can put a battery powered relay downstream of the (dumb) switch, and have it broadcast events when power comes on and off, to control other smart devices, which just have to listen for the events (via a broker like HA).