Your analogy is probably better, yes, except that a luxury sedan is more than just 'a bit' pricier compared to a Corolla. I'm not a car expert, but it looks like BMW's entry level 3 series is about double the cost of a Corolla.
BMW 3er is not a sedan either; it is a "compact executive", a bit smaller. Don't get me wrong, it's a nice car, and bigger than subcompact, but if you wanted something sedan-sized, pick something else. 5er is sedan-sized (and entirely elsewhere price-wise).