In A. Hitchcock's masterpiece film, Rear Window (1954), Thorwald enters the front door, because it was unlocked. Why would the protagonist keep his door unlocked?
I can think of many reasons:
Jeff keeps the door open throughout the movie because he broke his leg and he's immobile. That way visitors could enter easily.
He's probably doing this because there are also steps leading up to the door and he can't bolt it himself. (Even if there weren't any stairs, it's still hard to reach it when he's in a wheelchair and his leg is sticking out like that.)
Stella leaves the apartment right before Thorwald appears, which is why the door is unlocked in the first place.
Jeff didn't go to lock it when she left (or told her to) because the phone rang at that very moment and distracted him, and he had to answer it. He was also too worried about Lisa to think about it right then.
It's possible neither Stella nor Jeff thought Thorwald would be so brazen to actually come to Jeff, his own neighbor, and try to kill him after the police has been by.
This is a friendly neighborhood in the 50s, where the residents possibly kept their doors unlocked anyway.
I think Hitch left this plot hole wide open. Homicide wasn't the only crime to worry about. There were plenty of robberies & burglaries. People's dogs were murdered, too.
Sure, The West Village might have been "friendly," but it wasn't immune from crime.
Keep in mind that Lisa had to climb through Thorwald's window because his door was locked.