I am not sure that it is the beta's being old when you buy them at walmart, it more depends on how long they have been treated that badly. I got my current beta at meijer, another place well known for their bad treatment but I got him the day of or the day after their shipment of betas arrived, so they didn't have time to abuse him.
I think if you would be able to find out when the store you want to get your beta at- walmart or otherwise- gets their new shipments of fish in you shouldn't have any problems finding one that will last more than a few months. Fish are also very picky about when and how they move and where they move to. Atlough I've had this problem more with the goldfish I have owned in the past than with betas.
Here are some helpful transition hints when you moved your new guy home:
-have your tank set up for atleast 24 hours before hand (this lets any ravel dust settle, the water get to room temperature)
-at first put your beta and the water he came in into a plastic bag and place this in the tank water first for 5-10 mins (this will make a smooth temperature transition for him)
-sometimes it helps to already have some aquarium salt in the water for when your new beta arrives. (they've just been through a tramatic experience for a fish and this will help keep their health up while they are stressed and adjusting).
Hope this helps,
Fantails and Betas