Read above. This wasn't a crime of passion.
I'm going with a little from column A and a little from column B. He wasn't hitting on dudes, going to gay clubs well outside his hometown for 3 years and using Grindr, Jack'd and Adam4Adam because he wanted to be an inside operative.
He also didn't suddenly, over the course of a short period of time, decide that he was going to buy an AR-15 and kill a group of innocent people.
This is something that very well could have taken years to work up to doing. This whole plot could something he was using to cover his dick loving ways for all we know.