More specifically, it's because Meta views the lack of ownership of their own hardware platform as an existential threat. They see AR/VR as the next revolutionary platform, so they're betting the farm on being first movers in a mass-market AR/VR space that they anticipate to exist in the future.
Assuming AR/VR is actually going to be the next thing, how are they going to fight the lock-in due to Google and Apple ecosystem?
Being first isn't going to be enough if Google and Apple manage to release something soon enough and with a better integration with all their other devices