Strange choice, fitting rooms with a novel device to annoy guests. Do you suppose it's because somebody fell out of bed and sued? And then maybe some other people thought that was a good idea, and they fell out of bed too, and now the hotels have to have the annoying thing.
I find it somewhat unlikely, as this particular W hotel was not in a country known for personal injury lawsuits.
More likely it was sold to them by some interior design firm as a luxury feature. Unfortunately it's only helpful if you're alone--even if it worked correctly you wouldn't want the room lights turning on just because your spouse got up.
Can easily see this as another profit centre. If you paid for single occupancy and call down because the lights come on every time your partner gets up, hit ‘em with a big fine.