AI, and VR tech don't pay out right now. But AI is rapidly developing and Meta is one of the leaders in AI research. We could easily see chatbots, Alex like things, or even manufacturing and disability assistance. Or robots and image classification. Skies the limit. The thing is with this tech, the killer product doesn't even exist yet, and probably isn't even a thought in someones mind.
The goal is to make it so when the killer product does arrive, all the R&D they've invested is able to allow them to become to dominate leader. The same also applies to VR tech and the interfaces for VR. It's not a consumer focused field, but their R&D is worth millions, and when it comes time for the killer product, they'll have it, or be able to smother the one who does.
And this honestly makes sense for a company like Facebook. Their golden goose is dying. Facebook won't churn out money. All the legislation against them is killer, and they know it's a market propped up by easy VC money where almost no social media company makes money. So why not invest the all their billions into future tech we'll see likely playout in 5-10 years, where they will then be able to completely pivot to that product. It's the long game.