Before we philosophise on the point of a replaceable derailleur hanger, we should probably first clarify what it actually is.
A replaceable rear derailleur hanger is a machined piece of metal which attaches the derailleur to the frame.
One very important -- and frustrating -- thing about hangers is that each one is shaped specifically to fit a particular frame. There's no Bossi hanger or Open hanger or Whatever Brand hanger; each hanger is unique to each frame model.
As a result there are about a kabillion different shapes, and you need to know what shape yours is if you have to replace it. Hurray!
(Think we're kidding? Here's a small sample.)
To frustrate bike mechanics!
We kid, we kid. The hanger's job is to sacrifice itself if your rear derailleur suffers an impact.
Well, it's a lot cheaper to replace a rear derailleur hanger than a rear derailleur.
If you've crashed your bike, there's a good chance it's happened upon impact. We also see a lot of bent hangers from bikes that have just fallen over while being propped against a wall or during an inattentive moment. (Hey, it's hard to hold your bike plus a coffee plus a bacon sandwich plus check out your Insta feed.)
Ask yourself: were my gears working OK before my bike hit the ground and now they're not? Then you've probably got a bent hanger.
Your hanger is also definitely bent if you hear a tinny 'ting ting ting ting' noise while you're cycling. If this happens, STOP RIDING. That 'ting' sound is your derailleur brushing against your spokes. If your derailleur goes into the spokes, well, one of three things can happen (and sometimes all three things happen at once):
So consider 'ting ting ting' the death rattle of your ride until you can get your hanger sorted out.
If you've ever stacked your bike with a bunch of others outside a cafe, used a bike cage or locker at work, parked your bike in public, or put your bike into your car, there's a good chance either you or someone else has tapped the area, which is enough to put the hanger out and make your gears misbehave.
There's one other way to get a bent hanger, but it's less common: poor shifting technique.
Some hangers are particularly soft and even the force generated by shifting with too much load on the pedals is enough to send them out of alignment. To prevent this, pretend you've got eggs between your foot and your pedal when you're changing gears, until the gear engages.
To keep your hanger safe, don't lean your bike's gears against or on top of anything, and shift with care.
Take care of your gears and they'll take care of you, because they sure do suck when they don't work.
Still having gear problems? We'll fix 'em for you.