I have fitted a fair few battery's to bmw and i have come across this problem before where it keeps a headlight on at all times and a quick battery code has sorted it out. Not sure why this happens but hey its a bmw so anything is possible and its worked for me in the past. Coding the battery in MUST be done otherwise the ECU will not send the correct charge to the new battery and you will be back to pushing it to get the thing to start.