Telegram is used a lot in developing countries which are using phones made 3-7 years ago. Or phones that are made recently but with old chips and tech. Maintaining a search index across literally millions or billions (some groups are really really big) messages isn't something your phone can reasonably do.
I do wish telegram was e2ee for IMs, but for groups and super groups and channels I don't particularly care.