Despite of all the hates of this movie, I think people read this movie wrong. Michael is confuse and he has a weak faith, in himself.
He thought that God wanted him to be "straingt", so he follows what he actually didn't need to follow. Religion could be a savior or a monster. In Michael's case, it ate him alive and made him more than confuse. His true self was exactly on the last part of the movie. He realized that "his path" was wrong! But can he changed that again without people seeing him as a confuse person? It was an open ending. My thoughts, that finally he realized that he is actually gay. And nothing can change that. Not even God. Or religion, any religion.