It's an M car and a pretty good one at that. Ms will hold their value compared to other models in the lineup.
Your opinion won't change what the markets dictates. A lot of ppl think an e30 m3 with just 198hp isn't worth 30k, but look at the prices.
Also the cars you are comparing them too are much less desirable because of their problems and how bad they age. Of course they are going to sell for less.
Find me another 2dr, coupe, manual, rwd, class, luxury with comparable performance. There isn't much....that is why they are what they are....
I'm sure you can find a higher mileage one for closer to 15k if you keep looking, but the lower mileage, clean well maintained one will sell for more.
If you are looking for value, look at some 335i. But they have their problems, and being a non-m they will continue to depreciate at a faster rate. E92 Ms, are more than double the cost of an e46 m, esp a lower mileage one. If you can afford it, go for it. I did after a 2yr search for an e46 and I haven't looked back.