There is a big difference in a gun safe, and a gun cabinet. There is also a big difference in a real fire rated gunsafe (90min-3hr rating) and a gunsafe.
A simple gun cabinet, like the stack-on cabinets available for $100-200 at most shops (like K-mart) are just cabinets, they don't offer any fire protection, and don't offer much in the lines of theft protection. Safes are a different animal, and often include fireproofing, as well as amazing levels of security.
If you think about what is involved in a safe, the high prices make sense. There are a few contributors that make safes somewhat different than standard inventory products at most stores.
I won't necessarily go into "inventory cost", but sufficed to say, that safes aren't high sale volume items, so when a store buys one, they don't plan on it leaving any time soon. Holding inventory costs money. So there's one strike.
Because safes are a low volume item, they're expensive to produce. The inherent cost of designing, building, maintaining customer service, replacement, etc etc is all spread out over a small number of units, so the overhead cost of each unit is high. There's another strike.
Steel prices are high, and there isn't much involved in a safe except hardened steel. There's another strike.
Earning a UL certified fireproofing rating is an expensive process. Fireproofing materials aren't cheap, and the research to prove that you pass the standards costs a lot of research dollars. Again, another strike.
Theft-proof ratings, like fireprofing, also takes research dollars. Safes are generally rated by the time it would take a skilled "cracker" to enter the safe, using conventional "safe-cracking tools". A 5min cabinet in general can be entered in a few minutes by anyone with a crow-bar and a hammer. A 5hr safe requires much more effort. Designing, testing, and certifying your safe designs for theft protection costs money. Yet another strike.
Then you have to consider that safes are HEAVY. Transportation for inventory, distribution, even just handling around the shop and warehouse is a real obstacle. If you've ever moved a real safe into your house, then you'd realize the challenge that handling safes represents. There is a very high infrastructure cost to produce and distribute safes. Yet another strike.
Customer service for safes is a highly disciplined industry as well. When someone purchases or inherits a used safe, it's often common that they'll desire back up keys or request the record for the combination. Cheaper safes come with a sticker saying "do not forget this combination, it is not recorded ANYWHERE". Finer safes come with "in case you lose or forget your combination, contact customer service", as well as a registration system service to help provide identification reference in case someone DOES call asking for duplicate keys or combinations. All of this customer service and databasing increases overhead costs. Another strike.
High quality fireproof safes also come with internal waterproofing measures so that when firemen enter to put out a fire, your safe (which usually falls through the burning floor into the basement) doesn't get flooded. This flooding can destroy your items/guns just as fast as the fire would have. Fireproof waterproofing is not cheap. Another strike.
Safe manufacturers have the responsibility to provide legal liability for their products. Almost ALL safe manufacturers will replace your safe for free in the event of a fire and/or theft, plus liability for the protected items inside the safe if it can be proven that the safe failed to live up to their guarantees (like a 3hr fire safe burning up in 20min). These insurance policies aren't cheap. You guessed it, strike.
I'm not a baseball fan, but I'm pretty certain I just pitched a no-hitter against cheap safes.
Frankly, you get what you pay for in safes. My kid cousin breaks into his dads gun cabinet ($200 Stack-On 2 door) all the time with a key that came from their truck topper. I can enter my brother-in-laws $800 safe in a matter of minutes by removing the faceplate, removing the batteries, and executing the combination reset. OR, I can use the key to my office file-cabinet to force the manual over-ride lock (2 out of 5 of my file cabinet keys work in his safe). His safe also only weighs 400lbs, and he has it bolted to a wooden platform. This makes EVERYTHING very simple, why open it when I can steal the whole safe faster?, I can be in and out in about 10min with a dolly and a friend. I have 3 modes to steal all of his protected items in less than 10min, again, that's an $800 safe...