The Supreme Court decision related to this is being unfairly maligned in these comments, even though I'm in total agreement that the end result was bad.
I recommend reading the ruling [0] itself; it's readable and quite short, under 2,500 words.
The unanimous 2014 decision concluded that Amazon (technically, a contractor) could not be penalized under federal law for not paying workers for time spent getting through security screenings. It turned on the 1947 Portal-to-Portal Act. IANAL, but, looking at the decision, I don't see how they could have reasonably ruled any other way.
To summarize:
In the 1940s, courts had interpreted the Fair Labor Standards Act (source of the minimum wage, overtime pay, etc.) to imply very broad definitions of "work" and "workweek". This allowed mine workers to sue for back pay for all the time they spent traveling between mine portals and work areas. This wasn't consistent with pre-FLSA practice, and companies suddenly faced huge, unexpected lawsuits for back pay and damages. Congress passed the Portal-to-Portal Act explicitly to clarify the definition of time "on the clock" and prevent these lawsuits, excluding "preliminary" and "postliminary" activities.
It is this law that results in Amazon not having to pay their workers for the screenings. Quoting from Sotomayor's concurrence:
The security screenings at issue here fall on the
“preliminary . . . or postliminary” side of this line.
(*citation*) The searches were part of the process by
which the employees egressed their place of work, akin
to checking in and out and waiting in line to do so
activities that Congress clearly deemed to be
preliminary or postlimininary. See (*citation*).
Indeed, as the Court observes, the Department of Labor
reached the very same conclusion regarding similar
security screenings shortly after the Portal-to-Portal
Act was adopted
So, I believe that, obviously, Amazon should have to pay workers for these hours. But the blame for their not having to do so lies with the federal government's inability to update a 1947 law rather than with the courts.