Unfortunately I don't have any articles to back this up, just anecdotal discussions with drivers in Germany, but;
First: they're a domestic car manufacturer, lower cost to deliver to local drivers.
Second: they're able to offer specific taxi options, such as manual front seat adjustment (vs automagic).
Third: they offer a substantial discount to taxi drivers (they justify the discount through the marketing value of having large number of individuals ride in their cars).
Such discounts for marketing purposes is quite common in the industry. I've also heard dealerships sell cars to rental car companies at a loss, just to make sure customers have access to their cars (and will possibly consider buying that type of car for the next purchase).
In Denmark, you could buy a car for taxi use at a much lower tax rate than normal people, but after driving it with passengers for around 250,000km and 2 years you could sell it as a private vehicle. The calculation made the car extremely cheap (I've seen a calculation of deprecation of 20% over 2 years despite the heavy use ) -- so you might as well get a nice Mercedes.
The tax a private person has to pay to buy a car was 180% in 2015 so essentially a luxury car is nearly triple of what it might be in US, with a new S350 being $250k.
Thos taxi rules have changed recently however, so Mercedes may lose their 90% taxi market share.
I've always curious about why the taxi differences between North America and the rest of the world. When I was younger in Asia, we had these "luxury" taxis that were still very reasonably price. I was appalled that taxi rates in North America were so high and the cars were just terrible.