Why does my alarm system come on randomly with no one near the car? on 2002 BMW 540i

It seems to only do this when I have the doors locked. My battery had been dead but I recently had it recharged.

Asked by for the 2002 BMW 540i
computer issue. get it reprogrammed at dealership.