When stocking a tank it is important to meet the needs of all the livestock.
You should stock based on the adult size of the species-not the current size, then swimming needs, social needs, territory, compatibility, water chemistry and temp.....
Our goal with keeping fish is for them to grow, thrive and live to their average life expectancy......
By keeping fish in environments that don't met needs long term- is not much different than a Betta kept long term in one of the small temporary cups most are sold in.
Improper housing may work short term-but often it is just a matter of time before stress levels get to the point that the immune response is compromised and things crash......
IMO-anything smaller than 10gal is not larger enough to met all the needs of other species of fish along with the Betta long term....