I may be wrong with this and with BMWs, but a lot of cars come with three different keys, each of which are limited to what it will open.
The drivers' key opens everything. Another key is for valet use and will not open the boot. I think the third is a spare drivers' key.
The keys look the same, so I assume that it is the programming that is different. (The keys themselves are the same but the bit that you hold to use them is different so that you know which key is which.)
My 1997 2.8 auto boot can be opened by key even if the battery is out of the car or flat. I just turn the key, let it return and press the button.