I believe the couple were investigating the asylum, or maybe looking for someone. One or both are given a tour. At one point one or both look through the window of a locked door and see a space filled with the most monstrously insane. Later they are fleeing from the owner/manager/head doc and – in a rush – they open a door without realizing where they are and accidentally lock themselves in with the “monsters.”
Asylum (1972)?
https://www.imdb.com/title/tt0068230/