Presumably your example was for a federal job.
There is also a similar federal law but it exempts government jobs.
Its intentionally designed to be intimidating for three very non psudeoscientific reasons. Will you break under pressure? Some fraction truly believe and will confess in terror and can be filtered out. A weak effect is its an intelligence test, obviously it is not magickal and if you're smart enough you'll see thru it. It hasn't been gotten rid of because there really is no downside.
It is cheaper than the expensive labor intensive alternatives like interviewing more people or trying to find more records.
Much like astrology or prayer or swearing on a bible in a court of law, it is cheap and effective enough with minimal cost.
Break? Break what? This makes no sense. It’s not like they have verifiable information to see if you break too easily.
You’re making it sound like they were hiring a spy. Polygraph test are common in the public sector.
They simply do this for bureaucracy reasons. Government agencies need to comply with a bunch of old standards so they can demonstrate they performed all possible verifications in case they go under investigation.
Agencies don’t want to be in the position where a security clearance they granted is scrutinized only to find that they didn’t do a polygraph test while all the other agencies still perform polygraph tests.
Everyone knows polygraph tests are bullshit. They do them because they have too, not because they find them useful.
Then, some inconsistency came up. Apparently, on her application she checked the box for never having smoked weed. But on a second document she checked the "Yes" box. This is California 2015, they asked her to do a polygraph test. She failed.
Couple days later, she called the first job to see if she can come back. They were bitter that she left, but because of an extremely high turnover rate, they let her back in. It was never the same for her.
So yeah, have a guarantee at the new job before you quit the first one.