Well I cannot tell you the exact science or statistics but I would think that each dealership knows what sells or doesn't sell in their market so that they would order their cars accordingly.
For ex: I went to several local BMW and Mercedes dealerships and the most popular colors on their lot are : WHITE, SILVER, BLACK. Why is that?
Because the local dealerships know those are the most requested/popular colors so they order them accordingly. The same logic would apply to options as well.