His actions, which some have claimed or inferred as a "hate crime," may in fact be a "self-hate crime," a novel if no less heinous category. If Mateen's sexuality was ambiguous, he may also have been deeply ambiguous about it and about himself.
His attack may have been a flamboyant act of atonement for acting out forbidden-by-Sharia homosexual impulses. A sort of Allah-see-how-much-I-reject-the-gay-life-and-its-followers, combined with suicide-by-cop.
My guess: we'll never be certain of his total motivation. Perhaps he was merely gathering intel on his target. This answer is suggested by the Occam's Razor principle which rejects complicated scenarios in favor of the simplest solution that covers the observed facts.
Later ... Occam missed this time. The New York Post has a fairly complete story about Mateen being gay, his ex-wife says so, as do many who frequented the Pulse club and remembered seeing him there. The Post reports the comments of a club bartender and his husband who denied Mateen had snapped seeing two men kissing each other in public.
That’s bullcrap, right there. No offense. That’s straight-up crap. He’s been around us. Some of those people did a little more than (kiss) outside the bar. He was partying with the people who supposedly drove him to do this?Whatever Mateen's motive, hating gays seems not to be a high probability alternative.