Sure, you "can" build your own forum software with AI. That doesn't mean you "should", however.
These days, it's pretty easy for anyone to create just about anything they want with AI. That's not really the problem. The problem comes when you start running into edge cases, security vulnerabilities, and other issues that go over the head of the "developer".
AI might be perfectly capable of fixing those issues, sure, but if the person using it doesn't understand what's going wrong, how are they going to know whether AI is actually fixing the problem or just putting a band-aid on it? I run into situations like this regularly when using AI to help me code.
There's also the issue of efficiency. Just because AI can write code that works doesn't necessarily mean it's writing code that works efficiently, especially when you're continuously adding new functionality to an existing codebase. Without someone who understands how everything works together, it's entirely possible to end up with software that requires significantly more server resources to accomplish the exact same tasks.
And then there's security. If you're running forum software that handles user accounts, private conversations, and other sensitive information, do you really want to be responsible for identifying and fixing every potential security vulnerability yourself?
I'm not saying AI can't build a viable alternative to XenForo. I absolutely believe it can. But building the software is only part of the equation. Maintaining it, securing it, and keeping everything running efficiently over the long term is a whole other animal. That's where having an experienced development team behind the software becomes valuable.
Considering how relatively inexpensive a XenForo license is, I just don't see the benefit of taking on all that responsibility yourself.