Why are dirtbikes so expensive?

Specifically used dirtbikes. I've ridden dirtbikes plenty of times, and currently own 3 road bikes(a Honda Shadow, a Yamaha FZ1, and a Honda 300f), but have been considering buying a dirtbike recently and can't see why they're so pricey. I was wanting to just get a smaller trail bike to have some fun in the woods with, but for the prices I've seen on used dirtbikes I could easily pick up a KLR650 or similar dualsport and it'd be street legal too. Obviously I know the dual sport won't be as good on the trails, especially with it being a larger bike than I was planning to get, but if I'm gonna be spending the same amount I'd rather go for the street legal one and get the extra on-road use out of it too. Would it be that much of a negative having a larger dual sport over a smaller off road only bike?

Added (1). Ian - I'm not looking for motocross/track bikes or trying to get 20' of air, just something to zip through some trails in the woods, so softer suspension set up anyways. If that was the case then by no means would I consider the KLR. So far the biggest downside I can see is in maneuverability through the trails with a larger bike, but still can't see why I'd pay the same or more for the smaller bike just for that.

Because customers are paying those prices.

Power to weight ratio.

A bike like a 450cc four stroke puts out about 10hp less than a 1200cc American V-twin.

Not to mention suspension… Try getting 20' of air on a cheap dual sport.

A modern dirt bike is a marvel of engineering.

Watch some mx, try this on a KLR:

Basic economics 101 supply and demand, governed by what the public is willing to pay.

Dirt bike are expensive so they can get 20 feet of air and do 60+ mph.
For cow-trailing, with reasonable comfort, a 200-250cc dual sport is better.

Because of his good cost performance, and practical

Because they are made to last, built to crash, and engines are made out of metal.

  • Why does it appear used cars are more expensive than new? For example. I'm looking at a 2019 Honda City, new it's $17,990 drive away if I look on car sales the 2017 model is even $19,000. Ok the 2019 is a manual price but that's a huge difference and 2 years on. Please tell me what I'm missing?
  • Why are Volkswagen Jettas so expensive? The base 2016 jetta comes with almost no features that other cars such as honda, corolla, mazda3, and nissan sentra have Its just a barebones car, what makes it so special that its justifies the same price?
  • Why are electricity generators so expensive? Are generators really worth $1500? I'm looking around for a semi decent generator and Hondas/Yamahas are thousands of dollars. Even cheap chinese made ones run about $400 or more. Why are they so expensive? I know the engines are pretty simple, is it the motor that creates electricity that's expensive?
  • Is it better to sell Cheap cars or Expensive cars? As a car salesman? Some people would think cheap cars but people with bad credit get declined often. I know this because my credit sucks and i'm almost always declined for cars. I'm sure this makes it tougher to get a sale right? This has me thinking, i want to sell cars. Should selling luxury cars like mercedes and bmw be better than selling hondas and toyotas?