> I get mostly annoyed with how expensive some old cameras are because branding.
Regarding branding, I'd say you're half-right: In the same way that a Leica or Contax 35mm camera costs more than a Nikon or Canon 35mm camera, and the Nikon and Canon cameras cost more than a Yashica or a Konica (or even lesser known brands), so do the more luxurious medium format brands cost more. If you've never shot with (for example) a Hasselblad and a Kiev 60 (a budget Soviet knockoff of a Hasselblad) then you might be missing an understanding of the literal quality tradeoff, but brand names do command higher costs regardless. This is the same now with new cameras as it is (and always has been) with old cameras
> I mean the medium format box cameras are literally just a box with a hole for a lens and a bit of mechanics to move the film and shutter.
Every 'old' camera - SLR or rangefinder or viewfinder, 35mm or medium format, etc - is a box with a hole for a lens and some mechanics to move the film and shutter. New cameras are just boxes with holes for lenses and a lot of electronics.
Part of the original cost of camera bodies has to do with the fact that you're buying into a system; it costs more for a company to exist that builds good camera bodies as well as an extensive lens and accessory lineup, compared to a company that only has a few or poor-quality lenses to pair with their camera bodies. Some camera companies invested a lot of money into their ergonomics, or their materials and finish, or durability, or new viewfinder and shutter technologies, or autofocus, and so on. These companies typically charged more for their products.
Making cameras and lenses in a larger format format compounds all production costs. They literally have bigger viewfinders and mirrors and film transport systems and more glass in their lenses.
> There's no reason for them being a thousand dollars still.
Nobody is making them anymore, which makes supply-vs-demand an issue. You can only repair cameras so many times, and some are very difficult to repair at all.
Nowadays, you pay more for a used film camera if it's extremely popular, and usually it's the best performing, best handling, best looking cameras with the best used market for lenses and accessories that command the highest premiums.