Realistically, it is generally so that the other people can go home. It's not some sadist conspiracy. If a shift starts at 7 and another ends at 7 then having a lack of people means things could have to stop or others have to stay longer.
Lots of places have legally mandated requirements of the number of people to be working at any given time so there's no leeway for someone being late, it's a 1:1 if you're late someone else has to stay longer.