Were you opening the door at the same time? If so, it is the key-in-ignition alarm. It would be that the lights are on. The alarm for that on the E36 is ab obnoxious buzz that would never be mistake for a beep. Yet another possibility is that the temperature had dropped to 37°F or lower right around the time you turned teh car off, and you were getting the "black ice prevention/caution" alarm.
Please clarify: this happens every time you turn your car off or did this happen once only?