It's wrong to peep in windows.
John makes an unplanned stop at his friends house.
John wants to know if anyone is home.
John rings the doorbell to alert any occupants to his presence.
John looks through the window to see if anyone is home.
John is able to pay a visit with being intrusive.
John is embarrassed to see his friend in an intimate position.