I understand and have occasionally shared your frustration. I've always felt that the dealer's parts counter was "on the wrong side of the tracks" because
(a) people who buy parts and do their own service aren't patronizing the dealer's mechanics (remember that the markup on the mechanic's time is usually 100% while parts are marked up 10-50% and cars are marked up 5-10% -- YMMV, of course);
(b) people who fix old cars are less likely to buy new cars. All of this cuts into the dealer's income so I can understand why we DIY'ers may be less than welcome.
In any case, the parts people ask for your car's VIN for these reasons:
(1) that's how they've been trained;
(2) they use the same EPC that you can use for free
here and EPC starts by asking for the VIN;
(3) there are (rarely) mid-model parts changes and the catalog separates them by VIN - - "before VIN # this" and "after VIN # that." Knowing your VIN means they will get the right part. Horror stories abound.
In the specific case of the W210 fog lights, unfortunately the design did not allow for connector corrosion. You either replace the light fixture and the wiring harness or you scab your own spade connectors onto the wires and the fixture. This is a design flaw that fits in nicely with the "environmentally friendly" wire insulation that falls apart after ten years or so. My '96 E300D has not yet had this problem but I'll keep your experiences in mind. It isn't the fault of the parts guys so give 'em a break.
OTOH, there is no excuse for rudeness on either side of the counter. The dealer really should take the lead but you have to be willing to work with them. I started my good relationship with the local dealer by getting a free subscription to EPC [yes, it asks for a credit card number but that's only so they can confirm your USA residency -- EPC is free to US residents only].
When I go into the dealer, I bring along a printout of the picture and the parts list from EPC and highlight what I want. "Gimme that part," I say. The printout automatically includes my VIN (and I also carry it in my wallet). Over the months, now becoming years, I have made friends with the parts guys as well as the cashier girls, who are cute as well as intelligent. One of the parts guys told me that they like working with me compared to some other customers because when I come in, I'm prepared and it saves us both time. So it can be done, you just have to play by the rules.
Jeremy
__________________

"Buster" in the '95
Our all-Diesel family
1996 E300D (W210) . .338,000 miles
Wife's car
2005 E320 CDI . . 113,000 miles
My car
Santa Rosa population 176,762 (2022)
Total. . . . . . . . . . . . 627,762
"Oh lord won't you buy me a Mercedes Benz."
-- Janis Joplin, October 1, 1970