Why are bicycles so expensive?
Some example from Austria and Germany for new bikes:

~300€ will get you a cheap city/trekking bicycle with the cheapest components and 3x7speed gears. Often not assembled properly, low quality and heavy.
~600€ will get you a solid brand-name city/trekking bike or cheap MTB.
~900€ is where real road bikes and MTBs start.
&gt;1300€ here you get good aluminium frames and Shimano’s or SRAM’s mid-range components.
&gt;2000€ carbon frames, upper mid-range components. From this point on you mostly get improvements in weight.
&gt;4000€. The best of the best. Road bikes with electronic shifting, aero wheels, &lt;6.8kg weight etc.

I think for the US you can just replace € with $. Of course prices depends on region, discounts etc.
I don’t think bicycles in general are particularly expensive, you probably just looked in the wrong place.
As Pere points out in the comments, used bikes are often a good idea, especially when you need a cheap (&lt;300€) bike. But in my opinion you should have some knowledge about bike fit and bike mechanics to be able to properly evaluate (and repair/maintain) a used bike. Sometimes good bikes are sold as “broken” for a few dozen Euros despite only needing some adjustments, a new chain and new tires.