I work in a large warehouse. At the end of our shift, my coworkers and I all have to stand in line to have our bags searched for stolen items. There is a huge workforce here; sometimes, we are waiting for 20 or 30 minutes for our turn with the security guard. It's bad enough to have our bags searched, but the company doesn't even pay us for this time! We clock out at 5 p.m., then wait in line without pay for the privilege of getting searched. Is this legal?
The U.S. Supreme Court says yes, this is legal. Employers must pay employees only for activities that are "integral and indispensable" to the primary activities the employees are hired to perform. In other words, your employer doesn't have to pay you for pre-work or post-work activities, unless they are an essential part of your job.
For example, a worker in a chemical plant who must wear special protective clothing in order to do the job is entitled to be paid for the time spend putting on and taking off that clothing. Because the job can't be done without this protection, donning it is integral and indispensable to the job. However, a worker whose clothes get dirty on the job (such as a painter or a contractor) and chooses to change at the workplace is not entitled to be paid for that time. Although it makes sense to wear grubby clothes, the worker could put those clothes on at home. And, the worker could do the job in tux and tails, if he wanted; the job doesn't require certain clothing.
The Supreme Court recently heard a case similar to yours, brought by employees who worked for a company that contracted with Amazon to provide shipping services. The employees pulled inventory, packed it, and shipped it. At the end of the day, they were required to walk through a metal detector as part of a security screening process. Like you, the employees argued that they should be paid for this time. The Court found they had no such right. The searches were not an essential part of their jobs; employees could pack and ship items without walking through a metal detector at the end of the shift. The employees lost the case.
If this doesn't sound fair to you, you're not alone. In typical case in which employees aren't paid for time like this, the time often benefits the employee in some way. For example, an employee might prefer changing into dirty work clothes right before starting work, rather than wearing them in the car all day. But in the Amazon case, the security screenings were purely for the benefit of the employer. Also, the employees were required to go through the screening; it wasn't optional.
Taken to its logical extreme, this case would allow employers to tack on all kinds of unrelated tasks at the end of the work day, free of charge. That certainly doesn't seem like the right outcome. For now, however, the Supreme Court has spoken.