In a wide-ranging interview, Apple CEO Tim Cook talked about his decision to come out gay.

Cook came out in 2014, making him the first openly gay CEO of a Fortune 500 company.

(Related: Tim Cook: Being gay “among the greatest gifts God has given me.”)

Speaking with Bloomberg's David Rubenstein, Cook was asked why equality was important to him.

“As I look at the world, many of the problems of the world come down to the lack of equality,” Cook answered. “It’s the kid that's born in one ZIP code who doesn’t have a good education because they happen to be born in that ZIP code. It’s someone who is maybe in the LGBT community who is fired because of that. It’s someone who has a different religion than the majority and therefore they're ostracized in some way. If one day you could wave a wand and everybody in the world would treat each other with dignity and respect, there are many, many problems that would go away with that.”

Rubenstein asked why Cook gave up some of his privacy.

“Well, I did it for a greater purpose,” Cook replied. “It became clear to me that there were lots of kids out there that were not being treated well – including in their own families. Kids need someone to say, ‘Oh, they did okay in life, and they’re gay, so it must not be a life sentence in some kind of way.’ We’re getting these notes… it would tug on my heart even more, and it got to the point where I thought I’m making the wrong call by trying to do something that is comfortable for me, which is to stay private, that I needed to do something for the greater good.”

“No regrets?”

“No regrets,” Cook said to applause from the audience.