The first shelter I visited in 1993 had the same policy - they required those in need of food or shelter to attend a 90 minute church service before receiving assistance.
As I requested both food and shelter, it also stuck with me that the shelter locked us into its dormitory at 9 pm and unlocked the dormitory at 5:15 am. Anyone on the premises more than 15 minutes later, after 5:30 am, would be arrested, we were informed.