THE OFFENDING 'LAW' IS PROBABLY "PASSENGERS MUST OBEY THE INSTRUCTIONS OF FLIGHT PERSONNEL", which is most likely itself just an FAA regulation, and the actual law relates to the force of FAA regulations
Same thing with smoking in the toilets. I doubt it actually calls that out in the law, but it's secondary to some "must obey signs" crap