Not to denigrate the hard work of developers (particularly open source developers) who work on very complex application software like Thunderbird, but software designed for regular users needs to cope without cleanup scripts. (Yes, yes, I know that reinstalling Windows from scratch is a time honoured tradition...)
Maybe the old folders used mbox, which stuffs entire folders of emails in a single file, while the current stardard (for a while now) is Maildir, a file per email.