Legal and religious behavior in the penitentiary sphere: the theoretical aspect