I assume you're asking about why "select all" doesn't really select "all" but only visible messages?
Why, to protect (some) users from themselves and us - from them!
Please see app settings -> message list -> select "all" means -> change from "visible" to "loaded".
PS - if you're doing "spring cleaning" of your account, a mass delete -> using web mail (your mail provider's web site) just might be easier / faster.