It's because of the Android Support Library (or AndroidX/JetPack nowadays). It is basically a backport of many features found in new Android versions to devices running older Android versions, and is embedded in (almost) all apps to make them work and look consistent across Android versions. It shows up prominentely in decompiled apps, but it's not found in the original source trees as it is added as one of the final steps during the build stage. No one actually implements text selection themselves.