It means being too demanding or strict in complying with a rule. I guess that you never heard it before because the catholic tradition in your country is much less than in Romania and Spain. Although, at least nowadays, it is used with a little humorous tone

Quite funny, in France we have almost the same expression.
"We do not need to be more royalist than the King himself...", with the exact same signification. Funny how some expressions were adapted after some special
circumstances 