From the Wikipedia article for JCPOA:
After the Trump administration twice certified Iran's compliance in 2017, in May 2018 the United States withdrew from JCPOA as Trump pledged he would negotiate a better deal. Trump left office without fulfilling that pledge and analysts determined Iran had moved closer to developing a nuclear weapon since the American withdrawal.
Trump and his staff for sure knew Iran's regime wouldn't accept to meet the Americans to negotiate about a new deal. So I don't think that's the reason. Of course, maybe Trump thought Khamenei is another Kim Jong-un and the two can meet!
The only other reason I can think about is that Trump administration thought Iran would continue its efforts to make atomic bombs whether with or without the deal. So it would be better that there is no deal at all... But according to the quoted text Trump administration twice certified Iran's compliance before.
Also, there's this quote by Trump in this PoliticalFact article:
“This deal if I win will be a totally different deal. This will be a totally different deal.”
Trump wasn't sure about his reelection, let alone making a new deal after winning.
So what was the reason for Trump administration to withdraw from JCPOA?