Father Edward Beck is a Roman Catholic priest and a religion commentator for CNN. The views expressed in this commentary are his own. View more opinion on CNN.

(CNN) Should voters care what political candidates believe theologically or to what faith tradition, if any, they subscribe? I don't. It doesn't matter to me if they find spiritual inspiration in a church, synagogue, mosque, temple, ashram, Yellowstone National Park or their own house.

But I do believe that political candidates, especially presidential ones, need to have the moral rectitude and ethical backbone to make wise political decisions based on compassion and the common good.

Many Americans have formed their consciences and instincts toward right behavior as part of the Judeo-Christian tradition based on love of God and neighbor. Religion has provided their moral compass.

Out on the presidential campaign trail, candidates have been engaging the issue of religious faith head-on. Indeed, at several recent CNN town halls, Democratic presidential candidates, such as Sens. Cory Booker and Elizabeth Warren, have brought up issues of morality and spoken about their faith.

And at his town hall a few weeks ago, Pete Buttigieg, mayor of South Bend, Indiana, discussed his views, contrasting them with those of Vice President Mike Pence, who was Indiana's governor during part of Buttigieg's tenure in office.

Buttigieg told the audience that his feeling "is that Scripture is about protecting the stranger, and the prisoner, and the poor person, and that idea of welcome. That's what I get in the Gospel when I'm in church." He said that the vice president's perspective "has a lot more to do with sexuality, and, I don't know, a certain view or rectitude."

A few weeks before Buttigieg made those comments, I had the opportunity to sit down with him to explore in depth his ideas about faith, religion, God and Scripture. According to a 2016 Pew Research poll, most Americans want a president to have strong religious beliefs. I wanted to know what influence religion has had in the development of this candidate's ethical and moral view of the world.

Of course, I make no endorsement of any candidate, but I welcomed the chance for the discussion with Buttigieg. Our interview was lengthy and wide-ranging, so it has been condensed and edited for clarity and flow.

We began by talking about Buttigieg's early experience of religion.

Father Edward Beck: You were baptized Roman Catholic, and your father was a Roman Catholic from Malta?

Buttigieg: Malta was personally converted by St. Paul, so Catholicism is extremely deep and universal among the Maltese. My father's journey was a little complicated. He became or started to become a Jesuit. And then somewhere on the back end of that he was a leftist intellectual immigrant living in America. His experience of the '60s is a little murky to me. My family in Malta for the most part remains deeply religious. And I was baptized, I think more or less right away, by a theologian of science and religion at Notre Dame.

Beck: I think you've said that your father did not remain religious because your family didn't go to church much or anything like that. It was just important that you got baptized.

Buttigieg: Yes, if anything my mother considers herself more religious, although she was not as likely to attend church either. Her mother was Methodist, but Mom identified more with the Anglican faith. She taught at National Cathedral School for a time, around the time my dad was a Jesuit, I think.

Beck: So, the Jesuits made your father lose religion, huh? (Laughter)

Buttigieg: A lot of things are blamed on the Jesuits, but I don't want to contribute to that.

Beck: Even though you didn't go to church much, you did go to a Catholic high school.

Buttigieg: For me a lot of it was soaking up a tradition that I hadn't understood very well at first. I felt that many of the social teachings that I was imbibing were either very much consonant with what I believed or led on to what I was coming to believe. The teachings on justice, on what had happened around the world, learning about El Salvador, for example, in a government class, learning about Catholic commitments to human rights was very powerful because it helped me understand why many different people could overlap onto the same intuition about right and wrong. And maybe the most helpful thing of all was the instruction on Scripture.

A faith evolving in adulthood

Beck: When you were a Rhodes scholar at Oxford, your encounter with religion began to change.

Buttigieg: By the time I was an adult I didn't view myself as Catholic. When I began to view myself as religious was really something that happened while I was at Oxford. I had been very committed to and am very committed to Enlightenment values but ... finding the humility to realize that there were forms of truth that I was not going to be accessing through reason kind of prompted me to look for more.

I found myself going to services at Christ Church, which happened to be across from my college, Pembroke, at Oxford and found in that very simple liturgy a way to begin to organize my spirituality. So that by the time I came back to the US I felt like I was more-or-less Anglican.

JUST WATCHED Inside Mayor Pete Buttigieg's media strategy Replay More Videos ... MUST WATCH Inside Mayor Pete Buttigieg's media strategy 04:59

When I got back to South Bend and was looking for a church home, I found in (the Episcopal Cathedral of) St. James this faith community that really takes seriously that it's urban, that it's part of a city. And just very quickly felt drawn to that community. And now for about 10 years it's been my faith home. So it was important for me to be married in the church. And when Chasten and I go together I think it brings us closer together. It was a mix of faith but also of community that really made it the right place to be. And, of course, the fact that we were welcome.

Beck: You describe your faith as more liturgical than theological. So does that mean that you don't consider yourself having private, individual spirituality or a life of prayer outside of that gathered community?

Buttigieg: I don't know why I wound up liturgically conservative other than maybe habit, but I do feel that way. If there's going to be music, I want an organ, not a guitar. ... And I've always struggled with prayer as a concept, just because the idea that when you address the Almighty, we do it, grammatically, in the imperative mood. It's an interesting thing.

Granted, in a literal sense, it's asking for things, but that's problematic, too, as though we encounter God, and he hasn't already figured out what we need. So I guess in that sense I do find that ritual organized prayer makes sense because it is a way to tune my own heart to what is right.

On the moral weight of military service

Beck: You've served in the military (in 2014 Buttigieg was deployed to Afghanistan for seven months). As a Christian how did you approach military service ethically and morally?

Buttigieg: What I told myself at the time was that there are cases where violence is necessary in order to prevent greater violence. And I believed in our mission in the sense both that it was protective of my country, and also in the sense that it was a pretty grim thing to see what the Taliban had done and what they would do given the chance.

JUST WATCHED Next US president could be youngest ever Replay More Videos ... MUST WATCH Next US president could be youngest ever 02:24

To the extent that I experienced any injury as a consequence of having been there, it was not from moments when I was afraid of being killed, as much as it was from moments when I may have participated in killing. Over time I began to realize that was the part I was having the hardest time coming to terms with.

I understand why it can be necessary, but I don't think we have really, in terms of what we ask of people in the military, I don't think we've really reckoned with the moral weight of what we're asking them to do -- not just in terms of the physical risks they take but the moral harm that we're asking them to go through.

On navigating the abortion debate

As mayor of South Bend, Buttigieg was embroiled in the abortion debate when he vetoed a rezoning request by an anti-abortion pregnancy counseling center that wanted to establish itself adjacent to an abortion clinic.

Beck: Tell me a little about that experience and why it was so volatile.

Buttigieg: I understood from the outset that my responsibilities legally and ethically had to do with zoning, but nobody who was calling my office about this issue was doing it because of their views on zoning. People cared about this issue based on where they came down in the abortion debate.

The problem for me was not that this organization wanted to open a seventh location in this neighborhood. It was that I was being asked to sign off on changing the zoning law over the objection of the would-be next-door neighbor -- and over the objection of the (Common) Council members for that district -- without seeing a compelling reason about why it absolutely had to be there. And so the council in a narrow and very bitterly divided vote, I think 5-4, voted it through, but I couldn't sign it. I just didn't think it was right.

People think I did it for political reasons, which is probably the most hurtful because my political judgment told me that the simplest thing to do would be to quietly sign off and the issue would go away.

Beck: What about late-term abortion?

Buttigieg: Ironically, an issue like this is mostly for me about freedom from government. It is being aware that there are these incredibly painful, morally complex, but often also medically complex situations. And the question is: How do we make sure, as people navigate this in a really painful human way, that there are as few undue pressures on them as possible?

JUST WATCHED Buttigieg backs Green New Deal resolution Replay More Videos ... MUST WATCH Buttigieg backs Green New Deal resolution 03:02

At the end of the day these are, as I understand it, measures that are designed to preserve the life and health of the mother, who is only getting to that point, I imagine, for the most part, if she had every intention of carrying a pregnancy to term. And I just don't see how my intervention as a government official, making rules about what she can and can't do, is going to help.

Beck: But don't we ask government to intervene in other life issues, such as murder?

Buttigieg: There are consensus issues and there are decisive issues. We demand that government intervene when we can all agree on what's at stake. The problem with this issue is that we can't all agree on what's at stake. There was a Notre Dame law student who said that birth control, abortion and infanticide are all the same thing. To me, I cannot relate to someone who views the world that way, but I get that some people do, and they think the creator of the universe wants them to think that way.

On love, marriage and being gay

Beck: You came out as gay relatively late (he was in his 30s, and in the middle of a re-election campaign). Talk about that.

Buttigieg: You could rewind to when I'm 12 or 13 and say it was obvious -- but not to me. I desperately didn't want to be. I would have given anything. Professionally I had gravitated toward two things, political life and military service, both of which, at the time, it seemed to me were completely incompatible with being gay or, at least, with being out.

Beck: What's your take on why religion finds same-sex marriage so divisive?

Buttigieg: I saddens me because when I think about the blessings of marriage. First of all, it's one of the most conservative things about my life, very conventional. It is morally one of the best things in my life. Being married to Chasten makes me a better person. I would even say it moves me closer to God. And so the idea that this of all things is what people are attacking each other over and excluding each other over, when God is love, we are taught. Of all the things to beat people up over on theological grounds, it just seems to me that loving shouldn't be one of them. So it's a painful thing to watch. I mean I get it, but. ...

If you believe marriage has to do with love, if also, by the way, at the risk of sounding a bit conservative, you believe that sex has to do with love, or ought to, then I think it takes you to a pretty specific place. I've learned that it's an expression of love, at least it can be. And I guess I believe it ought to be.

On co-opting religion for a political agenda

Beck: Do you see religion being weaponized sometimes as just personal agenda and to make political points?

Buttigieg: Yes. And some of these things may also be believed in good faith, but I don't think that gives someone a license to harm others. I think that's where we draw the line on any freedom. The same way that we say that the right to swing your fist ends where the other one's nose begins. It is one thing to practice one's faith as one sees fit. It is another to harm somebody else in the name of that faith.

We discussed Mike Pence, and Indiana's Religious Freedom Restoration Act , which Pence, as governor, signed into law in 2015. It allows Indiana businesses to cite their religious freedom as a legal defense in lawsuits.

Beck: Talk about that law and your view of freedom of religion -- and freedom from religion.

JUST WATCHED Buttigieg was asked if Pence would be better than Trump Replay More Videos ... MUST WATCH Buttigieg was asked if Pence would be better than Trump 01:18

Buttigieg: (The Religious Freedom Restoration Act) appeared to me to be a license to harm others in the name of religion. ... It was to me a trashing not just of our sense of freedom and our sense of rights, but also, in some way, a trashing of religion. Like is this really the biggest thing we should be doing to accommodate religion right now: making it easier to harm people in its name?

Beck: It's been reported t hat Mike Pence believes that at this moment in history God wants him to be vice president and (Donald) Trump President.

Buttigieg: The section in my book about Mike Pence begins with that quote from Lincoln where he says, "Both sides in great contests invoke God, think and hope that God's on their side. Both may be, and one must be, wrong." The idea that God wants somebody like Mike Pence to be the cheerleader for a President largely known for his association with hush money to adult film actresses seems to me to give God very little credit.

Stay up to date... Sign up for our new newsletter. Join us on Twitter and Facebook

On his father's death

Beck: Tell me about the death of your father and its impact on you. (Buttigieg's father, Joseph, died in January.)

Buttigieg: (Long pause) Well, it's very recent so I'm still kind of working through that. (Pause.) I don't yet know how religion will help me make sense of my relationship with my father or his death, other than, of course, the fact that it holds out the hope of some form of unity or reunification.

We never really understand our relationships with the dead any better than we understand our relationships with the living. They're complicated and they're evolving, they're confusing, but they're probably the better part of who we are.