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.