Because he's an idiot. Same reason he attacked Iran after "totally obliterating" their program 8 months previously
Based on reports from the International Atomic Energy Agency (IAEA), which was responsible for monitoring the agreement, Iran was complying with the core nuclear restrictions of the Joint Comprehensive Plan of Action (JCPOA) before the United States withdrew in May 2018.
The IAEA issued more than a dozen reports between 2016 and May 2018 confirming that Iran was abiding by its commitments, such as capping uranium enrichment levels, limiting its stockpiles of low-enriched uranium, and restricting the number of operational centrifuges.