Temporary insanity.
But you say "no" during the interview for the HC. You don't offer your services for a lesser position while trying to win the greater one. That's bargaining 101. Schwartz's leverage was his #4 defense with the Bills. You don't offer that up for free.
I guess what I'm trying to say is even though he said no during the interview process, had an offensive HC been hired, he may have gone back on that. After failing to secure the HC position, he may have thought he could put out another great D for a year then use that to get another job, as you said.
The better bet is that every Bills HC will be sacked, every player will suck and every season will result in missed playoffs.
Anyway, it doesn't happen often, no. And maybe Hue Jackson or whoever does fire Schwartz. But it was an effective guarantee that he was gone with the Rex hire. It wouldn't have been with Gase etc etc.