The UK Border Agency's
e-Borders site states
... we will make full use of the latest electronic technology to provide a way of collecting and analysing information on everyone who travels to or from the United Kingdom.
Presumably to feed the
Big Brother database.
Now I come to think of it when I flew from LHR to LIS via FRA on LH (it was a free ticket

) in October I had to supply API though neither Germany nor Portugal is on BA's list. LH's website is not terribly helpful or up-to-date and does not mention the UK at all, though their system is set up to collect data when travelling to or from the UK.
Lufthansa is bound by law to register the passport information of every passenger on flights to the USA, Canada, Korea, India, Japan, China and Mexico. For these and other destinations you can easily register your data yourself at the Check-in machines, thus avoiding the sometimes lengthy registration procedure at the departure gate.