Next to the church, the prison-like building with those fierce, barred windows was, in fact, a prison when it was built in the 17th century.
There is a law that doesn't allow prisons to be constructed near churches of schools.