Re: Interesting problem
Lots of ways it can happen, two simple options are:
1: two separate systems. System 1 says room 123 is allocated.
Clark scribbles down room 132 into the card/paperwork, types that into the card machine writer and then reads it back and tells the customer that that is what their room is.
2: a race condition, two people checking in at the same time, the room is empty when both requests do the lookup for empty rooms, they both then create allocations for the room and store it back (after waiting to confirm details etc). Due to bad database/system design it doesn't realise the two entries have been written and both are left allocated to the same room for the same time period.