Sure it's legal, it's a side effect of "S Mode", their absolutely infuriating safety protocol that locks down just about every useful feature of Windows. A lot of manufacturers enable it during initial installation prior to sale. You have the option to turn it off and things run normally.
This demonstrates that the OS is operating on behalf of MS and not the user. The OS performs as MS dictates. This is a violation of trust.