I would say the two to three year in good conditions might be true if I didn't have two of my Three guys of my own that have been with me more than 6 years. My oldest is Harry and he has been with me almost 8 years now. Gunny my second oldest is now been with me for 4 years. So I would say it comes down to the condition and care they receive.
I have to somewhat disagree because my experience shows it has a lot to do with genetics and initial care from fryhood until the selling along with how we care for them. Also, today, more and more people, including me, are buying imported Betta. These Betta can go from the original country's water to the seller's water to ours in a matter of a few days or weeks. I cannot prove it but I believe this has to have and impact.
My two original Betta (51 and 50 years ago) were Woolworth's VT. They lived for seven years in unheated, unfiltered two-gallon bowls with weekly 100% water changes. No bloat, no fin biting, no diseases or ailments of any kind. The next two VT lived around seven years in filtered bowls as UGF for such small habitat had finally been invented. Not so the heaters. They would come later.
It is only in the last 10-20 years that I have noticed a decline in my Betta reaching such advanced ages. These are all now housed in filtered, heated tanks. Some community and some not. But they are not VT. They are Betta with exaggerated features and/or fins; they are imported. I still, knock wood, have not had any problems with disease, bloat, etc., in the Betta I cared for with diligence though their lifespan has been between two and four years instead of the VTs' seven+. However, in the Betta I neglected (see journal) the lifespan was much shorter because I did not practice due diligence.
So I agree our care is important in contributing to how long Betta live...frequent water changes being the most important. But our care, IME, is only a part of the total.