Aluminium foil can act as a basic shield against radio-frequency signals, potentially preventing the key fob's signal from being detected or relayed when the key is not in use. Your car keys could be sitting safely inside your house while someone outside manages to unlock your vehicle and potentially drive away. It sounds unlikely, especially when you have a modern car.