As discrimination based on religion is illegal in most of the world, it’s also probably exposing the person asking and the company to a lot of potential legal risk. It’s a big no where I live and part of the things you are explicitly trained to never ask about.