"Always buy the most expensive gun you can afford," was advise given to me over 25 years ago by the man who got me into firearms. He was my second cousin's husband (big family). I never forgot his advise and I never forgot the explaination. I've reflected on this advise every time I purchase a firearm. It's advise that's served me well and so I'm passing it along as I see many not understand it regularly.
It boils down to real cost, resale, and functionality. You always have a choice when you buy a firearm. The choice is gun A, or gun B, or gun C. With a few exceptions, the more expensive of the three guns is almost always built better. The real cost of purchasing one gun is not being able to purchase one of the other two guns with the money used. For example, Gun A is a $1000 Springfield 5" 1911, gun B is a $600 Glock 21, and gun C is a $250 Star. If you buy the Star, that money cannot be used to buy one of the other two guns. Now, you have the choice of saving the current $250 and getting gun A or B at a later date, or getting the Star now. The advice would point me towards saving till I could get a better pistol.
The point of resale is probably what most overlook when making this decision. The Springfield will always be worth more than the other two pistols, always. I will always be able to recoop a higher percentage of the money spent on the more expensive gun than the cheaper gun. There are times when any of the three just won't resell, but eventually they will. Even super-unique guns will sell if you find the right location to sell it. What I've seen not sell consistantly are crappy guns that won't work.
The last point is how well the gun functions. Ya, I know, Glocks are fairly cheap and ALWAYS work, right?For the most part, sure. Glocks, XDs, M&Ps, all seem to work pretty well. Then you go shoot a very high end custom pistol and the light bulb turns on. Consistantly over the last 30 years I've been shooting, I've seen and felt (while shooting) the more expensive gun will shoot better. Depending on the gun's use, there's a point where a less costly gun is good enough, but don't overlook the more expensive gun. It will shoot better, and resell (if ever sold) at less of a loss.
So, there it is. I know not everyone can afford a $3k custom built pistol, or a $7k custom built bolt gun. Obviously, the price of the guns being looked at are based on the amount the buyer can afford. But, if you feel you are settling for a cheaper gun, you probably are. The latest example of this I have dealt with is giving advise to a friend of a friend on which AR carbine for him to buy. I recommended the $650 used gun made by a better manufacturer in immaculate condition. He opted for the $450 kit gun with questionable origins to save $200 for whatever... He's already blew one of the rings and the gas key almost immediately became loose due to the absolutely half-assed staking job on it. I'm all for a good deal, but sometimes it just isn't worth it.