You'd be surprised how lousy many aftermarket rims are. The amount of cheap junk being dumped here from foundries in China and other places is staggering. There is (was) a lot of money to be made in the custom wheel business so plenty of people sourced the cheapest product possible, chrome plated it, leased a couple of Bentley's to pimp out, hired some fly girls and went to market.
OEM wheels have to meet very strict standards and specs developed by the automaker. Aftermarket wheels don't have to meet squat except a price point.
Yes, production volumes are part of the pricing. However, I'll bet your typical OEM buys more rims in a year than any Unique Motorsports type shop. OEM's buy just enough to cover their production needs plus some overages for collision, parts, etc.