Bettas are labyrinth fish which means they have an organ to allow them to extract oxygen from the air. So they are able to survive in much more cramped conditions than most fish because they do not need such a large water surface area for enough oxygen to sustain them to enter the water. However bettas are carnivores that require a diet rich in protein. This sort of feeding means they create a lot of ammonia. In my opinion, being kept in tiny containers with the levels of ammonia spiking to alarming levels and then suddenly dropping over periods of a week or so do them permanent damage.
My usual LFS keeps bettas in 2 litre (1/2 gallon) containers without filtration. It's still smaller than they really need but they are much better fed and kept much cleaner (water changes every second day) than the vast majority of pet store bettas. All of the bettas I have bought from there have been well adjusted, taken to larger tanks well and been easy to feed, handle etc. Another LFS I sometimes go to abuses its bettas. They are kept in containers about one and a half times their length in diameter, that contain so little water a veiltail cannot flare without its fins being out of the water. It's disgusting.
Both bettas I have rescued from that shop have been severely traumatised. After three months I have managed to rehabilitate the first. It was not easy. He is still terrified of sudden movements, scared of other bettas a lot of the time, cannot be hand-tamed (most of my bettas will accept my touch without flinching) and I doubt that I could get him to spawn. I haven't attempted because I don't have a suitable female and now that he's settled I doubt he would cope with the upheaval. The other rescue betta I have had for only a few days. He has severe swim bladder issues (probably caused by being unable to rise up or down) chews his fins, refuses food and panics whenever I walk past his tank.
Excuse my soapboxing but the whole issue of betta abuse really irritates me. No matter how many fortunes I spend rehabilitating bettas, all I would be doing is supporting the cruel trade. Because they CAN survive in these conditions, nobody ever questions whether it's right to expect them to survive in these conditions. Just because something CAN be done doesn't mean it SHOULD be done. Bettas are not toys to be given to children who cannot care for them, or ornaments to sit on some fat suit's desk and wither into oblivion. They are living creatures and they deserve a stimulating and interesting simulation of their natural habitat or another suitably occupying tank.