in theory, it is to make sure you get the right parts.
but here is a fun exchange I had with my local dealership last fall.
me: I wanted to see if you have the following PN's in stock
they: I have to have your VIN
me: I just want to see if you have the parts there
they: we can't look up anything without a VIN
me: I have the part numbers!
they: can't do it w/o a VIN.
me: I'll call back.
(I go out to the car, write down the VIN, come back in, call back, go thru voicemail, get put on hold & disconnected, call back, etc, finally get the parts person back)
me: here's my VIN XXXXXXXXXXXX do you have PN ZZZZZZZZ?
they: oh, you don't need a VIN # for THAT!
amusingly, from other calls I learned they have no idea that there are some studs holding the DP to the turbo (it's not 5 bolts), or how many clips hold the underbody trim piece I ordered to the body (it takes four, they ordered two).
but, they were kind enough to ask why I wanted exhaust bolts, and to advise me that I was putting my warranty in danger.