Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Been using email since the late 90s and I don't think I've ever done a "select all" and then "delete".

Does this happen in any folder you try it in?

Which Mac model and what version of macOS?
 
I have a couple of mailboxes that only get junk. The bulk mailbox on yahoo for example. It doesn't quit all the time, but when it does, it's annoying. The report gets sent to apple every time I "reopen."
 
Reports to Apple may be considered by them if you're on Big Sur. Otherwise…probably ignored.

It does sound like a bug as, like most folks these days, you probably don't have any Mail add-ons. Another possibility is a corrupted file somehow associated with your email or Mail app.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.