I'm going to guess alcohol was involved, but it could have simply been exhaustion.
Also, depending on the apartment building, lots of apartments can look the same. You ever been so tired and/or drunk that you forgot how many flights of stairs you walked? Try to unlock the wrong car? Use the wrong key to try to unlock your front door? Or stand in front of a door, trying to unlock it only to discover you're on the wrong floor at the wrong apartment?
I've done ALL of those things when exhausted or drunk. Hell, if you walked into my apartment building - ALL of the doors are painted identically and look exactly the same. If you were drunk or tired, you could easily try to go into the wrong apartment on the wrong floor.
I've also seen some stupid ass shit done in apartment buildings. I was visiting a friend a few months ago, they have an attached parking garage. I parked on one of the ramps, between floors, believing I'd parked between 5 and 6. My friend says, "We're on the fifth floor, apartment 21"
So, I walked down the ramp and enter the building from the access door. No sign is present to tell me what floor it is, I ASSumed that it was floor 5. Besides, there is only one 21, right? Wrong. It turns out they numbered ALL of the apartments on each floor identically. On the MAILBOXES they are 121, 221, 321, etc. But on the doors? 21, 21, 21, 21, etc. So, when someone, not my friend, opened the door to apartment (4)21, because I'd parked between floors 4 and 5 (not 5 and 6), I was a little surprised.