You don't have to buy a new tube each time you get a flat, you can patch it several times if the flats were caused by small punctures. When you do, you have to check the rim and tyre to see what caused the flat, especially if the flats keep happening like this. There could be a thorn stuck in the tyre, rim tape not in its place, protruding spoke, metal residue... all these things will give you grief when the tube is under high pressure.
It is also important to make sure that the tyre is seated properly and that the tube is not pinched between the tyre and the rim. The former would cause a wobbly tyre, and the latter would result in a pinch flat/snakebite soon after.