They just forgot him.
He wasn't held hostage but he did have to call the police to leave.
Friend of mine worked for a company that serviced industrial control computers. His last job of the day was simple ISA card swap, no big deal, and afterwards he was asked to go wait in a conference room while they ran a couple checks because the manufacturer had supplied recycled interface boards in the past.
A half hour passed. Then an hour. It's not a big deal, he's got a laptop, and internet, plus there's free coffee and a bathroom right down the hall.
Oh, and the company is paying him overtime, so..
Just after two hours in he decides to let go of the last few cups of coffee and get a refill, only to find the rather beefy steel door locked from the other side.
He makes a bunch of calls, to everyone he can think of, and no one answers. He pounds, hoping someone hears him. He slams with his shoulder, hoping to pop the door loose. He punches the drywall next to the door, only to find it's been laid over concrete block when he hurts his hand.
In his head he was going through contingency plans about what corner to piss in versus saving it to drink later, and if his boss is going to actually pay for all the overtime he's about to get when it occurred to him that he could just call 911.
It wasn't actually police that got him out, it was a pair of firefighters with axes, but the police were right behind them demanding his ID and insinuating he'd broken into the building, resulting in another hour of overtime in handcuffs.
The police did at least let him use the bathroom, and the client was unbelievably apologetic.