it is a saftey feature to keep idiot kids from sticking their head out of the sunroof while its closing. The relay can be replaced but I forgot how and where the write up is.
<span style='color:gray'><span style='font-family:Courier'>1995 e36 3 Series RIP
1999 e46 3 Series BURN IN HELL
2000 MR-S Roadster= Current</span></span>