Ya a tree that goes without pruning can last for several years, though as I understand it it will usually get slower and slower (and the fruit will get smaller and smaller) rather than just stopping, but you're in a pretty hot climate for a peach tree anyway (though within the bounds obviously), so it's possible that the foliage growth just outweighed the fruiting.

It could also have something to do with the weather. If the flowers were killed early on, then the tree wouldn't fruit. Like if it was too hot, etc. In this case, it should do fine the next year.

I would recommend pruning the tree though for sure, just make sure to not remove more than 30% of the growth of the tree in any 1 year. You can slowly get it back into the proper shape, but only 30% a year.