1. P2P doesn’t give Google all that juicy mineable data that they get when everything you do makes round trips through their servers.
2. This would also implicitly encourage Android users to rely more on services like Google Drive/Docs for all files, which is good for them.
Edit: Apparently it is disputed that iOS has superior P2P file transfer support vs Android (see reply below), so perhaps all this is a moot point. I was assuming the truth of the parent post, and didn’t realize it was contentious; and since I’m not an Android or iOS expert, I can’t really argue that topic either way.
It's a feature of the Files app https://play.google.com/store/apps/details?id=com.google.and... which has over 100M installs.
Look at the 3rd screenshot.
ENCRYPTED FILE SHARING
Files’s offline file sharing is secured with WPA2 encryption, providing a more secure file transfer. Files app uses Bluetooth to set up encrypted and direct fast wifi connection, so that you can transfer app APK or large files in seconds, send videos or pictures to your friends. Safe and secure.
SHARE FILES OFFLINE
Share your pictures, videos, documents, or apps with others nearby who also have the app. With fast speed up to 480 Mbps, it’s fast, free, and it works without the internet, so it doesn’t cost mobile data. Just pair up your phone with anyone nearby who has Files app.