No, it's not the best idea. But since male Betta fish can't be housed in a tank together, there are no alternatives. There are better ways and worse ways for this to go down.
The better stores make sure they only have as many Betta on-hand as they're going to sell in a short period of time. Employees check on them regularly, make sure the stock is rotated, and any sick fish are dealt with. Ideally I would think a Betta cup should not sit on the shelf for more than a day or two.
The worse stores just don't care. A certain family-friendly superstore that shouldn't be selling fish to begin with comes to mind. They just stack up the Betta cups like they are any other products. Fish die, Cups get tipped over. Kids mess with them. Nobody cares. There is a special place in Hell for store managers who allow this kind of thing to happen.
Once Betta is home he needs a tropical aquarium just like any other fish. Five gallon minimum if it's just him, but ten gallons is much better.