Why is Apple so petty that they want to remove their developer account? I presume they pay for that. Their Fortnite app violated the rules, they removed the account and so be it.
Do they terminate the developer accounts of every other legit developer that has an app rejected?
Fortnite didn't just violate the app store rules. Violating app store rules is normal, your app gets rejected, you fix it, your app gets accepted. In this case, Epic wanted a new feature that they knew, and every developer would have known, had no chance to pass an app review: They wanted in app purchases bypassing Apple. No way that would have passed a review, but if they had submitted it, no harm would have been done.
So instead, they produced an app that would change its behaviour after some time, say on August 10th (don't know what date it actually was). Before August 10th, the app would only show allowed in-app purchases, after August 10th it would show in-app purchases that bypass Apple. When Apple reviewed the app, it passed. Some time later, the app didn't behave as reviewed anymore. That is in itself a violation of the rules that gets your app removed. But in this case it was intentionally fraudulent.
Apple took the only correct action, which was removing the app. Then it turned out that Epic had actually prepared a lawsuit to be issued immediately after the app removal.
Now consider that there is a contract between Apple and every development company. Both sides agree to behave in certain ways. Part of the contract is that Apple can cancel the contract; I don't think they need any reason for this. But they have plenty of reason. Epic's fraudulent behaviour submitting an app for review that later changed it's behaviour, clearly planning to use this as a pretext to sue Apple, and so on. Any reasonable company would close down its business relationship with Epic in that situation, and that's what Apple is doing.