The GOPe and spooks no doubt conspired to do Flynn in.
Flynn had been very unpopular in intelligence when he was forced from running the DIA and by making Flynn an issue, Priebus escaped Trump’s initial impulse to can him for betrayal and leaks. So when the two interests overlapped (and then Jared probably weighed in on the GOPe side), it was apparently too much from Trump to stand strong on.
DJT was willing to keep Flynn, but Flynn decided to resign.