Any closed system like a jar or bowl requires wastes to be removed somehow.
First, you should be feeding your fish a specially designed FLOATING Betta food. You should give it no more than 3 pellets PER DAY. Overfeeding of fish is the #1 cause of death. While the fish may appear hungry and will even eat of offered food, it will lead to more accumulated wastes in the bowl. The fish does NOT need more nutrition.
Since it is a small space and a bowl, I suggest weekly water changes. Be sure to use a tap water treatment to eliminate chlorine and chloramine both of which are deadly to fish.
Yoour Betta has been able to survive in foul water because it is a partial airbreather. Normally when the water had an odor to it, fish can no longer breath safely in the water.
Often pet stores will underestimate the work inolved in keeping a fish for a pet. Ater all a sale is a sale, and most people would rather have a monthly change than a weekly change. But all in all, its a very simple process. NEVER EVER wash the bowl with soap. If you need to scrub it down, add table salt and warm water and rinse well before adding the fish back.
Bettas should live for 3 to 5 years. I have had some live as long as 13 years, and commonly 7 to 8 years. The key to success is proper feeding and not overfeeding.
Poor water will lead to disease like fungal and bacterial infection and ultimately cause an early death.