I don't know about the newer BMW keys but mine had inside them
A tuned circuit and a diode that formed a battery charger to keep the internal battery charged
A radio that could send the lock/unlock/trunk unlock and panic signals.
The car ignition lock emitted some signal that via the circuits in the key kept its internal battery charged.
I am not surprised that they were expensive.