They absolutely do have a reason to lie about it, if a large number of active users on the site were fake/bots the share price would tank.
And that is the whole thing, please define "active" users or indeed if Twitter claimed less than 5% of their total userbase or 5% of their posting user base, 5% of "browsing" users, or 5% of their userbase that interacts are bots?
There are at least three different possible ways to look at 5% of users or even "active" users, and that's before you start to narrow down your definition.
For example is someone who browses Twitter "active", is someone who once a week "likes" something an "active" user, how about someone who posts a comment or a retweet once a fortnight?
I suspect Twitters number is probably high by their definition (lawyers will have been involved in it, and they tend to be very cautious creatures that are easily startled by noises such as "you lied in legal documentation"), but you need to actually know what their definition is before you can even start to try and work out how accurate it is, and by the sounds of it Musk signed his deal waiving the right to examine that under an NDA.
It's almost certainly going to be extremely hard to show who is a bot or not on Twitter a lot of the time, as there is probably not much difference in a lot of the bot accounts and say "passive" users who might only like a comment once in a while until the bots go fully active and start doing the Tory MP thing of dozens or hundreds of identical posts defending the PM within minutes.
Even on something like a computer forum the definition of "active" users can vary a lot, as IIRC the software may consider anyone looking at the forum as an "active" user, or it may only count those who are logged into accounts, whilst others might only consider how many posts are made, or how many accounts make a post in a set time frame (and that time frame might be daily, weekly, monthly or more).