From what I understand, a car dealer makes the bulk of its profit from its maintenance department. Most of the time they make very little profit from your used car, it's usually just resold to a wholesaler. The dealer is usually only interested in reselling relatively new cars of the same make. The biggest reason they take trade-ins is because it makes it easier to make a sale and it makes it easier to play with the numbers.
So yes, you shouldn't sell to a dealer, but if you don't know why you can be conned when you're surprised by how much they actually offer for your trade-in.
A BMW 3-series costs about twice as much new as a Camry, so that seems like equivalent depreciation to me.